mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
frames: don't force dark theme to all windows
Use global theme variant only if window does not have _GTK_THEME_VARIANT property. This allows applications to request default theme variant when global dark theme is enabled. https://bugzilla.gnome.org/show_bug.cgi?id=761543
This commit is contained in:
parent
e5ce6192f4
commit
247909e161
@ -447,7 +447,7 @@ meta_frames_new (int screen_number)
|
||||
}
|
||||
|
||||
static const char *
|
||||
get_theme_variant_override (MetaFrames *frames)
|
||||
get_global_theme_variant (MetaFrames *frames)
|
||||
{
|
||||
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (frames));
|
||||
GtkSettings *settings = gtk_settings_get_for_screen (screen);
|
||||
@ -474,17 +474,13 @@ meta_ui_frame_attach_style (MetaUIFrame *frame)
|
||||
{
|
||||
MetaFrames *frames = frame->frames;
|
||||
const char *variant;
|
||||
const char *variant_override;
|
||||
|
||||
if (frame->style_info != NULL)
|
||||
meta_style_info_unref (frame->style_info);
|
||||
|
||||
variant_override = get_theme_variant_override (frame->frames);
|
||||
|
||||
if (variant_override)
|
||||
variant = variant_override;
|
||||
else
|
||||
variant = frame->meta_window->gtk_theme_variant;
|
||||
if (variant == NULL)
|
||||
variant = get_global_theme_variant (frame->frames);;
|
||||
|
||||
if (variant == NULL || *variant == '\0')
|
||||
frame->style_info = meta_style_info_ref (frames->normal_style);
|
||||
|
Loading…
Reference in New Issue
Block a user