From 22dfa8213c7bffdbb76c261132e30345f5f27318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= Date: Tue, 23 Sep 2014 23:11:26 +0300 Subject: [PATCH] menu.c: force pixel size for menu item images Get pixel size from GtkIconSize and use it to force size for images in menu items. --- gnome-panel/menu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnome-panel/menu.c b/gnome-panel/menu.c index de9444c..29943db 100644 --- a/gnome-panel/menu.c +++ b/gnome-panel/menu.c @@ -437,6 +437,7 @@ do_icons_to_add (void) { while (icons_to_add) { IconToAdd *icon_to_add = icons_to_add->data; + int icon_height; icons_to_add = g_list_delete_link (icons_to_add, icons_to_add); @@ -459,6 +460,9 @@ do_icons_to_add (void) g_object_unref (icon_to_add->pixbuf); } + if (gtk_icon_size_lookup (icon_to_add->icon_size, NULL, &icon_height)) + gtk_image_set_pixel_size (GTK_IMAGE (icon_to_add->image), icon_height); + if (icon_to_add->gicon) g_object_unref (icon_to_add->gicon); g_object_unref (icon_to_add->image); -- 2.1.0