summaryrefslogtreecommitdiff
path: root/gtk/gtkiconhelper.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2020-02-05 09:49:23 +0100
committerAlexander Larsson <alexl@redhat.com>2020-02-06 09:38:25 +0100
commit021aaef824283644a02938e04d4c1958cdb0a389 (patch)
treec59f74834924f3f3cd8e740ab5e7e09db34a2430 /gtk/gtkiconhelper.c
parentc691399a80af43cdbbb71aa1ac00a2678640b9d1 (diff)
downloadgtk+-021aaef824283644a02938e04d4c1958cdb0a389.tar.gz
GtkIconPaintable: Always recolor when snapshotting.
It never makes sense to paint a texture that needs recoloring. If you call the regular snapshot on a symbolic texture we just use the default recoloring colors. To support this we also change gtk_css_style_snapshot_icon_paintable() to call gtk_icon_paintable_snapshot_with_colors() for IconPaintables so that we get the correct colors, and we make it not emit the color matrix. Since we now rely on the icon to do the recoloring we also drop the recolor argument in gtk_icon_paintable_snapshot_with_colors() as its not needed anymore.
Diffstat (limited to 'gtk/gtkiconhelper.c')
-rw-r--r--gtk/gtkiconhelper.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c
index 21e6def09a..0c8e960d53 100644
--- a/gtk/gtkiconhelper.c
+++ b/gtk/gtkiconhelper.c
@@ -223,8 +223,7 @@ gtk_icon_helper_paintable_snapshot (GdkPaintable *paintable,
gtk_css_style_snapshot_icon_paintable (style,
snapshot,
self->paintable,
- w, h,
- self->texture_is_symbolic);
+ w, h);
gtk_snapshot_restore (snapshot);
}
else
@@ -232,8 +231,7 @@ gtk_icon_helper_paintable_snapshot (GdkPaintable *paintable,
gtk_css_style_snapshot_icon_paintable (style,
snapshot,
self->paintable,
- w, h,
- self->texture_is_symbolic);
+ w, h);
}
@@ -280,8 +278,7 @@ gtk_icon_helper_paintable_snapshot (GdkPaintable *paintable,
gtk_css_style_snapshot_icon_paintable (style,
snapshot,
self->paintable,
- w, h,
- self->texture_is_symbolic);
+ w, h);
gtk_snapshot_restore (snapshot);
}
else
@@ -289,8 +286,7 @@ gtk_icon_helper_paintable_snapshot (GdkPaintable *paintable,
gtk_css_style_snapshot_icon_paintable (style,
snapshot,
self->paintable,
- w, h,
- self->texture_is_symbolic);
+ w, h);
}
}
break;