aboutsummaryrefslogtreecommitdiff
path: root/src/im-menu-item.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-02-13 10:41:46 -0600
committerTed Gould <ted@canonical.com>2009-02-13 10:41:46 -0600
commita4738b0a364ae508fc6237ca3a341ba1123f03e0 (patch)
tree2b4d5c3fc0d31bf6f0c948e07faacd9b62b36237 /src/im-menu-item.c
parent043e1ebadc3bbe90d0c989a38fbcf1288db1f343 (diff)
downloadayatana-indicator-messages-a4738b0a364ae508fc6237ca3a341ba1123f03e0.tar.gz
ayatana-indicator-messages-a4738b0a364ae508fc6237ca3a341ba1123f03e0.tar.bz2
ayatana-indicator-messages-a4738b0a364ae508fc6237ca3a341ba1123f03e0.zip
Adding in scaling of icons
Diffstat (limited to 'src/im-menu-item.c')
-rw-r--r--src/im-menu-item.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/im-menu-item.c b/src/im-menu-item.c
index abb8684..d1f3832 100644
--- a/src/im-menu-item.c
+++ b/src/im-menu-item.c
@@ -148,9 +148,15 @@ icon_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateL
ImMenuItem * self = IM_MENU_ITEM(data);
ImMenuItemPrivate * priv = IM_MENU_ITEM_GET_PRIVATE(self);
- gtk_image_set_from_pixbuf(priv->icon, propertydata);
+ gint height, width;
+ gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height);
+
+ GdkPixbuf * scaled = gdk_pixbuf_scale_simple(propertydata, width, height, GDK_INTERP_BILINEAR);
g_object_unref(propertydata);
+ gtk_image_set_from_pixbuf(priv->icon, scaled);
+ g_object_unref(scaled);
+
gtk_widget_show(GTK_WIDGET(priv->icon));
return;