[gtk/fix-icontheme-invalidation: 9/14] settings: Call gtk_system_setting_changed
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fix-icontheme-invalidation: 9/14] settings: Call gtk_system_setting_changed
- Date: Wed, 22 Apr 2020 01:07:54 +0000 (UTC)
commit 922827fa20d3e2329831dd472192f6b9452a121f
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Apr 21 15:45:21 2020 -0400
settings: Call gtk_system_setting_changed
Replace calls to gtk_style_context_reset_widgets by
gtk_system_setting_changed, with the appropriate setting.
gtk/gtksettings.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index c6b9634213..2787801ac1 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -29,7 +29,7 @@
#include "gtkstyleproviderprivate.h"
#include "gtktypebuiltins.h"
#include "gtkversion.h"
-#include "gtkwidget.h"
+#include "gtkwidgetprivate.h"
#include "gdk/gdk-private.h"
@@ -1246,32 +1246,29 @@ gtk_settings_notify (GObject *object,
case PROP_FONT_NAME:
settings_update_font_values (settings);
settings_invalidate_style (settings);
- gtk_style_context_reset_widgets (settings->display);
+ gtk_system_setting_changed (settings->display, GTK_SYSTEM_SETTING_FONT_NAME);
break;
case PROP_THEME_NAME:
case PROP_APPLICATION_PREFER_DARK_THEME:
settings_update_theme (settings);
+ gtk_system_setting_changed (settings->display, GTK_SYSTEM_SETTING_THEME);
break;
case PROP_XFT_DPI:
- /* This is a hack because with gtk_rc_reset_styles() doesn't get
- * widgets with gtk_widget_style_set(), and also causes more
- * recomputation than necessary.
- */
- gtk_style_context_reset_widgets (settings->display);
+ gtk_system_setting_changed (settings->display, GTK_SYSTEM_SETTING_DPI);
break;
case PROP_XFT_ANTIALIAS:
case PROP_XFT_HINTING:
case PROP_XFT_HINTSTYLE:
case PROP_XFT_RGBA:
settings_update_font_options (settings);
- gtk_style_context_reset_widgets (settings->display);
+ gtk_system_setting_changed (settings->display, GTK_SYSTEM_SETTING_FONT_CONFIG);
break;
case PROP_FONTCONFIG_TIMESTAMP:
if (settings_update_fontconfig (settings))
- gtk_style_context_reset_widgets (settings->display);
+ gtk_system_setting_changed (settings->display, GTK_SYSTEM_SETTING_FONT_CONFIG);
break;
case PROP_ENABLE_ANIMATIONS:
- gtk_style_context_reset_widgets (settings->display);
+ gtk_system_setting_changed (settings->display, GTK_SYSTEM_SETTING_ANIMATIONS);
break;
case PROP_CURSOR_THEME_NAME:
case PROP_CURSOR_THEME_SIZE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]