diff options
author | Alexander Larsson <alexl@redhat.com> | 2020-02-10 13:12:26 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2020-02-10 13:17:15 +0100 |
commit | ad0e9010611a9a4bfea9e5f691792491f32e1d09 (patch) | |
tree | 2428e9d57415bd28f856b5b5a9fa7eb8e4275aeb /gtk/gtkicontheme.c | |
parent | ba781eca74585ee6fc75d6945141e70384478557 (diff) | |
download | gtk+-ad0e9010611a9a4bfea9e5f691792491f32e1d09.tar.gz |
icon-theme: Add back and fix test for handling non-square icons
We test this by looking at the produced render nodes now that
we don't actualluy scale the icon. Also, it turns out that this
code was broken due to some typos, so we also fix those.
Diffstat (limited to 'gtk/gtkicontheme.c')
-rw-r--r-- | gtk/gtkicontheme.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 92d7c43e36..4adacf54ce 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -3721,7 +3721,7 @@ gtk_icon_paintable_snapshot_with_colors (GtkIconPaintable *icon, } texture_width = gdk_texture_get_width (texture); - texture_height = gdk_texture_get_width (texture); + texture_height = gdk_texture_get_height (texture); /* Keep aspect ratio and center */ if (texture_width >= texture_height) @@ -3739,7 +3739,7 @@ gtk_icon_paintable_snapshot_with_colors (GtkIconPaintable *icon, &GRAPHENE_RECT_INIT ((width - render_width) / 2, (height - render_height) / 2, render_width, - render_width)); + render_height)); if (symbolic) gtk_snapshot_pop (snapshot); |