[gtk/gtk-3-24: 1/2] GtkWindow: Handle non-square icons with height > width correctly
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 1/2] GtkWindow: Handle non-square icons with height > width correctly
- Date: Sun, 3 Jun 2018 23:23:02 +0000 (UTC)
commit d4feb8929ed40f1331060825611599723d2ab3ea
Author: Christian Stadelmann <dev genodeftest de>
Date: Sun Jun 3 21:05:46 2018 +0200
GtkWindow: Handle non-square icons with height > width correctly
gtk/gtkwindow.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index c6aa5425ff..b5f4b5af3d 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -4576,7 +4576,8 @@ icon_from_list (GList *list,
for (l = list; l; l = l->next)
{
pixbuf = list->data;
- if (gdk_pixbuf_get_width (pixbuf) <= size)
+ if (gdk_pixbuf_get_width (pixbuf) <= size &&
+ gdk_pixbuf_get_height (pixbuf) <= size)
{
best = g_object_ref (pixbuf);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]