Reputation: 93
I want to style a GtkToggleButton differently in the active and non-active states. As supplied, GtkToggleButton "sticks" active or not active after the click is finished -- i.e., the "toggle" part. I tried styling GtkToggleButton:active, but that doesn't "stick". That is, the GtkToggleButton:active CSS style elements do apply when the GtkToggleButton is clicked down, but when I release the mouse button, the widget's style reverts to the default (i.e., non-"active") style. Isn't the whole point of GtkToggleButton:active that the "active" state stays on when the button's state toggles to active after clicking, and then only goes off when when the button toggles back to not active after the clicking a second time? So why doesn't CSS applied to GtkToggleButton:active also stick?
Upvotes: 2
Views: 1016
Reputation: 93
Am I the only one who works on a problem for 3 hours, gives up, comes here begging for help, then tries that one.... last... thing..., and it works?
FYI, contrary to any documentation I could find, the style I was looking for is "checked", not "active" (yes, even for GtkToggleButtons that aren't checkboxes).
Upvotes: 4