diff options
author | Matthias Clasen <mclasen@redhat.com> | 2017-11-08 22:21:42 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-11-08 22:21:42 -0500 |
commit | 2aa52c7d0083f39615f33f663f247dc3fe2e23df (patch) | |
tree | 3fc29496ff49de108f0740f862f43d775aef4b2a /gtk/gtkiconhelper.c | |
parent | 7aa236fbb2a342e2d91a2a1c8690d87c7cec512e (diff) | |
download | gtk+-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.c | 26 |
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 |