[gnome-panel/wip/gnome-3.10+: 71/75] menu.c: force pixel size for menu item images



commit 797041b328285eeef1bac36b85748967dd508cdb
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Tue Sep 23 23:11:26 2014 +0300

    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 files changed, 4 insertions(+), 0 deletions(-)
---
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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]