I want to change the color of the popup to inverted, I use this:
$('path').popup({
on:"click",
transition:'vertical flip',
duration: 300,
});
But I dident fount in the docs how to add the key to add inverted, because if I add it directly to the dom, it works, so how to do it inside the script?
I got the answer from their github page
It is by adding variation: 'inverted', here is an example:
https://jsfiddle.net/vx59te34/
Related
I would like to know is there a way to change the knob-size of an "ion-range" while pressed. I've been looking at the documentation, but no info appears to be in the "ion-range" section. I would like to edit this info on SCSS:
Normal Behavior
Pressed behavior
The best way to find how to these things is usually to inspect the code (for example using Chrome DevTools) and see if Ionic adds a class to the ion-range when pressing it.
In this case, that's exactly what happens. When pressing the ion-range Ionic adds the range-pressed class so you can use that class to update the size of the knob like this:
ion-range {
&.range-pressed {
--knob-size: 44px; // Use any size you want here!
}
}
Please take a look at this Stackblitz demo:
I have a JavaFX button that has been set as Default Button so the user can select it with the Enter key. Currently, it has a blue background:
But I'd like to make it look like a normal button:
I took a look at the JavaFX CSS Guide and it looks like there's only one feature to override (-fx-base).
But changing this feature has unpredictable effects—sometimes it eliminates the button's gradient; sometimes it makes the button transparent.
Is there a simple way to just get rid of the Default Button styling?
My guess is that you are looking in the wrong style sheet. The old default style sheet caspian.css was replaced with modena.css. So setting default value for -fx-base from modena.css should fix the issue:
.button:default {
-fx-base: #ececec;
}
Simply put, I have a JavaFX Textfield that I wish to 1) change the text color on, and 2) change it back to that specified in CSS. Does anyone know how to (generally) access css colors etc. from within the JavaFX code?
AnyFxElement.setStyle(String elementCss);
For source of all the css capabilities I reccomend looking up caspian css.
To remove a style use the code:
// remove the background color on the button
yourElement.setStyle(null);
To set it back to it's default style:
// set the button style back to the default class
yourElement.setStyle(".yourStyle");
How do I adjust the background color of the event header in Fullcalendar?
I see that I can use color or backgroundColor to change the body of the event, but I don't see a setting for the header background color.
Quite simple using CSS
.fc-widget-header{
background-color:blue;
}
http://jsfiddle.net/ppumkin/PaKbx/
Passing the value from the feed is not a good idea as the header has nothing in common with events. So that would have to be passed somewhere else ;server side or jquery client side parsed from another source..
Thats just good practice-
but if you want you can pass the values back with your feed using a custom field
eg
[{ 'myHeaderForThisCalendar': 'Blue', ...other stuff ... }]
And using jquery look for that id and set your header using the CSS or ATTR function.
I'm trying to create a QPushButton that's just got an icon and a constant background color.
So that I can swap out the icon when the user clicks it, without any other apparent effects (this is for a roll-up/roll-down feature). I've added an entry like this to my stylesheet:
QPushButton.ToggleButton {
background-color: #8af;
}
and set the button's class to match, and this does indeed give me the look I want, except that when I click on it the background color changes to a lighter blue, which I don't want. What am I missing?
Edit: I guess I should mention I'm using Qt 4.5 and PyQt 4.6 to do this...
I know people like using stylesheets, but in this situation I think it is just as easy to make a custom button. Define a class that inherits from QAbstractButton, and override the paint() method. In the paint method, fill the rect with your desired background color, and then paint the current icon on top. It might be slightly more complicated if you want the border around the button as well, but not a lot.
Alternately, you could also look at the roles for QPalette, specifically QPalette::Light and QPalette::Midlight, which might be used to adjust the color of the button when pressed.
Answer
Try giving the button an ID with QObject::setObjectName and then applying the style with #idSelector?
In Python the code would probably look something like this:
button = QPushButton(self)
button.setObjectName("ToggleButton")
and stylesheet like this:
#ToggleButton:pressed {
background-color: #8af;
}
Further reading
The QFriendFeed example application at Forum Nokia is using Qt style sheets heavily to customize the UI.
I'm guessing doing background-color: #8af !important; would be too obvious so I'm assuming that doesn't work. It's worth a try if you haven't done it yet.
Otherwise, as noted in this question, there are specific states you can style. Try setting the same background color for the pressed state:
QPushButton.ToggleButton:pressed { background-color: #8af; }
Sorry if I misunderstood. Hope that helps.
open the button's stylesheet in Qt designer and try this:
QPushButton:pressed {
image: url(/path/to/your/file/fileName.png);
}