GNOME Bugzilla – Bug 719624
[Regression] CSS specifying colors for ToggleButtons only works when there's a modal dialog on top
Last modified: 2013-12-02 06:13:04 UTC
Mageia's drakxtools were recently ported from gtk2 to gtk3 One of those tools is diskdrake, a disk partition manager. It previously used a RC file to specify the GtkToggleButton colors but now uses a CSS file. This works fine with most themes but the default Adwaita. Application colors are OK with Gtk+3/Adwaita only when: - there's a popup dialog over main window - the focus is on another window (when switching back to diskdrake window, it remains OK for 1s, then Adwaita redraws it in gray) Thus CSS colors are only enforced when there's a modal dialog on top (eg: the confirmation dialog on startup) whereas RC colors were always enforced See https://ml.mageia.org/l/arc/dev/2013-09/msg00170/oxygen1.png https://ml.mageia.org/l/arc/dev/2013-09/msg00170/oxygen2.png (the names are misleading, it's actually adwait that's used)
Created attachment 263224 [details] rendering when there's a modal dialog or when another window has the focus
Created attachment 263225 [details] rendering when the window has the focus: CSS colors are ignored
Can you show us the css file that is used to set those colors, please ?
Here it is: http://gitweb.mageia.org/software/drakx/plain/perl-install/share/themes-galaxy.css (which works fine with eg: oxygen-gtk theme) Here's the old RC file: http://gitweb.mageia.org/software/drakx/plain/perl-install/share/themes-galaxy.rc
In the GTK+ CSS interpreter (and CSS in general), background-image takes precedence over background-color, so the gradients set by Adwaita on focused windows' buttons still takes precedence over your custom background-color, this doesn't happen on unfocused windows because no background-image is set for buttons there. In your custom CSS, you need to set "background-image: none;" as well, so only your background-color is left to define the background.
Thanks. Done: http://gitweb.mageia.org/software/drakx/commit/?id=038fd7ccc8c37fba4225cd86ab9ab285528ef8c7 BTW I pointed to the wrong CSS, it was http://gitweb.mageia.org/software/drakx/plain/perl-install/share/diskdrake.css