mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
css: Compare icon theme serials
When comparing to icon theme image values for equality, take the serial of the icon theme at compute time into account.
This commit is contained in:
parent
fe6ef5256b
commit
58ca3b05c9
@ -153,6 +153,7 @@ gtk_css_image_icon_theme_compute (GtkCssImage *image,
|
||||
settings = gtk_style_provider_get_settings (provider);
|
||||
display = _gtk_settings_get_display (settings);
|
||||
copy->icon_theme = gtk_icon_theme_get_for_display (display);
|
||||
copy->serial = gtk_icon_theme_get_serial (copy->icon_theme);
|
||||
copy->scale = gtk_style_provider_get_scale (provider);
|
||||
gtk_icon_theme_lookup_symbolic_colors (style, ©->color, ©->success, ©->warning, ©->error);
|
||||
|
||||
@ -166,7 +167,9 @@ gtk_css_image_icon_theme_equal (GtkCssImage *image1,
|
||||
GtkCssImageIconTheme *icon_theme1 = (GtkCssImageIconTheme *) image1;
|
||||
GtkCssImageIconTheme *icon_theme2 = (GtkCssImageIconTheme *) image2;
|
||||
|
||||
return g_str_equal (icon_theme1->name, icon_theme2->name);
|
||||
return icon_theme1->serial == icon_theme2->serial &&
|
||||
icon_theme1->icon_theme == icon_theme2->icon_theme &&
|
||||
g_str_equal (icon_theme1->name, icon_theme2->name);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -44,7 +44,8 @@ struct _GtkCssImageIconTheme
|
||||
GdkRGBA success;
|
||||
GdkRGBA warning;
|
||||
GdkRGBA error;
|
||||
gint scale;
|
||||
int serial;
|
||||
int scale;
|
||||
char *name;
|
||||
|
||||
int cached_size;
|
||||
|
Loading…
Reference in New Issue
Block a user