stylesheet

How to set the QToolButton's icons using style sheet?

倾然丶 夕夏残阳落幕 提交于 2019-12-05 10:23:01
I would like to set a QToolButton's icons using style sheets, like this : #include <QToolButton> #include <QApplication> QString FormStyleSheetString( const QString & name ) { const QString thisItemStyle( "QToolButton:enabled { image: url(" + name + "_normal.png); } " "QToolButton:pressed { image: url(" + name + "_pressed.png); } " "QToolButton:disabled { image: url(" + name + "_disabled.png); } " ); return thisItemStyle; } int main(int argc, char * argv[]) { QApplication qapp(argc,argv); QToolButton button; button.setStyleSheet( FormStyleSheetString( "button" ) ); button.setToolButtonStyle(Qt

CSS styling of flash message

廉价感情. 提交于 2019-12-05 08:50:26
What should I use to style my flash messages in my CSS? I can't seem to change it's styling. Here's the relevant code within the <body> of my application layout: <div class="container"> <%= render 'layouts/header' %> <section class="round"> <div id= "notice"> <% flash.each do |key, value| %> <div class="flash <%= key %>"> <%= value %> </div> <% end %> </div> <%= yield %> </section> <%= render 'layouts/footer' %> <%= debug(params) if Rails.env.development? %> </div> The relevant original CSS was something like this but it doesn't currently work. .error, .alert, .notice, .success, .info {padding

Bourbon vs Twitter Bootstrap for Rails 3.1

不问归期 提交于 2019-12-05 08:40:33
I am looking around at different stylesheet frameworks to pick out which one to use in my Rails 3.1 applicaiton. Twitter Bootstrap looks really cool, but I also see that Bourbon is becoming very popular too. Can anyone give a comparison and pros and cons of each? I am guessing it won't be a good idea to use them both, right? You could absolutely use both... Each are a set of SASS mix-ins and CSS classes. You may run into some overlap, but there's nothing that prevents you from using both 来源: https://stackoverflow.com/questions/7639394/bourbon-vs-twitter-bootstrap-for-rails-3-1

Can't override user agent stylesheet coloring my links

冷暖自知 提交于 2019-12-05 07:59:49
It's always these simple problems that snag me. I have a very simple page I'm building, and I want the hyperlinks to not be colored specially at all (not blue originally, not purple for visited) or underlined. I've done this in other sites before without issue simply by using a, a:visited, a:hover, a:active { text-decoration: none; color: none; } However, in this particular site, that's not doing the trick for the color, while the underline is successfully removed. I even tried adding the dreaded !important tag, with no effect. This issue has been seen on Chrome, IE 11, and Android (WebView).

Apply Gradient background color and image at the same time

你。 提交于 2019-12-05 07:36:06
Is it possible to apply background-image and background-color to a text field at the same time. What I was trying to achieve is : Show an icon at the right corner of text field. Also Make that text field a little bit gradient using the style background: -moz-linear-gradient(center bottom , white, #D6E5F4) repeat scroll 0 0 transparent Thanks yes; you can apply color & image at same time .You have to write like this: background: url("image.png") no-repeat 0 0,-moz-linear-gradient(center bottom , white, #D6E5F4); check http://jsfiddle.net/sandeep/7yMhX/ 来源: https://stackoverflow.com/questions

How to define css styles for a vue.js component when registering that component?

若如初见. 提交于 2019-12-05 07:18:50
I am able to register a custom vue.js component with // register Vue.component('my-component', { template: '<div class="my-class">A custom component!</div>' }) Also see https://vuejs.org/v2/guide/components.html How can I include css classes for my component? I would expect something like Vue.component('my-component', { template: '<div class="my-class">A custom component!</div>', css: '#... my css stylesheet...' }) but there does not seem to be a css option. I know that I could a) define all css classes in a global css stylesheet or b) use singe-file-vue-components (would require build tool

How to customize the title bar of a Qt app through Qt stylesheet?

心不动则不痛 提交于 2019-12-05 06:07:14
I'm able to customize the controls of a Qt app in a Qt stylesheet. However, I couldn't find a way to customize the title bar. I found some solutions but that requires modifying the code of the app itself. Is there anyway you could customize it using just the Qt stylesheet? Title bar isn't a part of your application or Qt and it cannot be configured with stylesheet. Title bar is provided by Window manager . In some WMs there is no title bar at all. Most WMs support customisable themes for window decoration. Usualy you can configure you WM to display specific window with specific theme. In Qt

Limiting the effects of a stylesheet to the parent widget?

ε祈祈猫儿з 提交于 2019-12-05 06:04:30
I am setting the background color of a QWidget subclass. When I do this using a stylesheet, the styles of the other components in the QWidget change (eg, the color of a PushButton, and its look changes). How do I make sure only the background color of the container widget changes and the rest of the child components remain unchanged? One way is to specify an ID selector. Make sure to set the objectName of your container widget (with setObjectName() ) and use that name in the CSS selector. Assuming a widget named MyContainer , you would use something like this: QWidget#MyContainer {...} Try

Is this how you would structure your CSS stylesheet?

≡放荡痞女 提交于 2019-12-05 05:04:10
问题 Leaving aside the question of whether you should serve single or multiple stylesheets, assuming you're sending just one, what do you think of this as a basic structure? /* Structure */ Any template layout stuff should be put into here, so header, footer, body etc. /* Structure End */ /* Common Components*/ Repeated elements, such as signup forms, lists, etc. /* Common Components End*/ /* Specific Page 1 */ Some pages might have specific styles, that would go here. /* Specific Page 1 End */ /*

I want to apply an existing CSS style to all labels on a page. How?

不羁的心 提交于 2019-12-05 03:24:55
Note, this is different than the older question How can I apply CSS on all buttons which are present in that page? because this is an already existing style. So given that a style, which we'll call "standard_label_style" already exists in an included CSS file, what can I do to say that all the labels on this page should have that style short of adding: class="standard_label_style" to each and every one? And yes, I know I could apply the styles ex-post-facto with a snippet of jQuery or JavaScript code. I'm just trying to learn how I'm supposed to do it with CSS. Follow Up I've gotten several