After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 640983 - GtkSettings: Fix theme not updating for dark theme
GtkSettings: Fix theme not updating for dark theme
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-01-31 00:38 UTC by Bastien Nocera
Modified: 2011-01-31 02:23 UTC
See Also:
GNOME target: 3.0
GNOME version: ---


Attachments
GtkSettings: Fix theme not updating for dark theme (902 bytes, patch)
2011-01-31 00:38 UTC, Bastien Nocera
none Details | Review
GtkCssProvider: Take into account variant (1.79 KB, patch)
2011-01-31 00:39 UTC, Bastien Nocera
none Details | Review

Description Bastien Nocera 2011-01-31 00:38:30 UTC
So that the setting can actually be set by the application after GTK+ init'ed.
Comment 1 Bastien Nocera 2011-01-31 00:38:32 UTC
Created attachment 179669 [details] [review]
GtkSettings: Fix theme not updating for dark theme

The theme was not updated when the "gtk-application-prefer-dark-theme"
GtkSettings property changed.
Comment 2 Bastien Nocera 2011-01-31 00:39:10 UTC
Created attachment 179670 [details] [review]
GtkCssProvider: Take into account variant

When loading a theme, make sure we take into account the variant
so we don't use the plain version when the theme changes.

Also make sure to fallback to the plain theme when loading a variant
fails.
Comment 3 Bastien Nocera 2011-01-31 00:40:06 UTC
Both patches are necessary to get dark themes working again with the CSS theme provider.
Comment 4 Matthias Clasen 2011-01-31 02:23:31 UTC
Thanks. I've reworked the second patch a bit, doing the fallback in GtkSettings instead of in get_named(). The reason for that is that we're going to land css key theme support soon, and it doesn't make sense to fall back from gtk-keys.css to gtk.css, in most cases.