summaryrefslogtreecommitdiff
path: root/gtk/gtkiconhelper.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-11-08 22:21:42 -0500
committerMatthias Clasen <mclasen@redhat.com>2017-11-08 22:21:42 -0500
commit2aa52c7d0083f39615f33f663f247dc3fe2e23df (patch)
tree3fc29496ff49de108f0740f862f43d775aef4b2a /gtk/gtkiconhelper.c
parent7aa236fbb2a342e2d91a2a1c8690d87c7cec512e (diff)
downloadgtk+-2aa52c7d0083f39615f33f663f247dc3fe2e23df.tar.gz
Simplify the gtk_snapshot_icon_texture API
Instead of passing the color matrix in from the outside, just pass a boolean and set up the matrix internally.
Diffstat (limited to 'gtk/gtkiconhelper.c')
-rw-r--r--gtk/gtkiconhelper.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c
index f0fa3cfd9a..094802ee8c 100644
--- a/gtk/gtkiconhelper.c
+++ b/gtk/gtkiconhelper.c
@@ -609,38 +609,18 @@ gtk_icon_helper_snapshot (GtkIconHelper *self,
GtkSnapshot *snapshot)
{
GtkCssStyle *style;
- GdkTexture *texture;
- graphene_matrix_t matrix;
- graphene_vec4_t offset;
style = gtk_css_node_get_style (self->node);
gtk_icon_helper_ensure_texture (self);
- texture = self->texture;
- if (texture == NULL)
+ if (self->texture == NULL)
return;
- if (self->texture_is_symbolic)
- {
- GdkRGBA fg, sc, wc, ec;
-
- gtk_icon_theme_lookup_symbolic_colors (style, &fg, &sc, &wc, &ec);
-
- graphene_matrix_init_from_float (&matrix, (float[16]) {
- sc.red - fg.red, sc.green - fg.green, sc.blue - fg.blue, 0,
- wc.red - fg.red, wc.green - fg.green, wc.blue - fg.blue, 0,
- ec.red - fg.red, ec.green - fg.green, ec.blue - fg.blue, 0,
- 0, 0, 0, fg.alpha
- });
- graphene_vec4_init (&offset, fg.red, fg.green, fg.blue, 0);
- }
-
gtk_css_style_snapshot_icon_texture (style,
snapshot,
- texture,
+ self->texture,
self->texture_scale,
- self->texture_is_symbolic ? &matrix : NULL,
- self->texture_is_symbolic ? &offset : NULL);
+ self->texture_is_symbolic);
}
gboolean