diff options
author | Ted Gould <ted@canonical.com> | 2009-02-13 10:41:46 -0600 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-02-13 10:41:46 -0600 |
commit | a4738b0a364ae508fc6237ca3a341ba1123f03e0 (patch) | |
tree | 2b4d5c3fc0d31bf6f0c948e07faacd9b62b36237 | |
parent | 043e1ebadc3bbe90d0c989a38fbcf1288db1f343 (diff) | |
download | ayatana-indicator-messages-a4738b0a364ae508fc6237ca3a341ba1123f03e0.tar.gz ayatana-indicator-messages-a4738b0a364ae508fc6237ca3a341ba1123f03e0.tar.bz2 ayatana-indicator-messages-a4738b0a364ae508fc6237ca3a341ba1123f03e0.zip |
Adding in scaling of icons
-rw-r--r-- | src/im-menu-item.c | 8 |
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; |