aboutsummaryrefslogtreecommitdiff
path: root/src/idolevelmenuitem.c
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2023-08-05 02:03:39 +0200
committerRobert Tari <robert@tari.in>2023-08-05 02:04:19 +0200
commite487b162ba82a1a454657a8ab5dbd6d04a17b591 (patch)
tree89f3201214321fbc0384562f70164f2f057d0711 /src/idolevelmenuitem.c
parentebb915b50119f79968a8e93697a90660eab93872 (diff)
downloadayatana-ido-e487b162ba82a1a454657a8ab5dbd6d04a17b591.tar.gz
ayatana-ido-e487b162ba82a1a454657a8ab5dbd6d04a17b591.tar.bz2
ayatana-ido-e487b162ba82a1a454657a8ab5dbd6d04a17b591.zip
Do not hardcode icon sizes
fixes https://github.com/AyatanaIndicators/ayatana-indicator-sound/issues/89
Diffstat (limited to 'src/idolevelmenuitem.c')
-rw-r--r--src/idolevelmenuitem.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/idolevelmenuitem.c b/src/idolevelmenuitem.c
index b7ce543..5f4f5bb 100644
--- a/src/idolevelmenuitem.c
+++ b/src/idolevelmenuitem.c
@@ -143,23 +143,8 @@ static void idoLevelMenuItemStyleUpdateImage (IdoLevelMenuItem *self)
}
else
{
- GtkIconInfo *pInfo;
- const gchar *sFilename;
-
- pInfo = gtk_icon_theme_lookup_by_gicon (gtk_icon_theme_get_default(), pPrivate->pIcon, 16, 0);
- sFilename = gtk_icon_info_get_filename (pInfo);
-
- if (sFilename)
- {
- GdkPixbuf *pPixbuf;
-
- pPixbuf = gdk_pixbuf_new_from_file_at_scale (sFilename, -1, 16, TRUE, NULL);
- gtk_image_set_from_pixbuf (GTK_IMAGE (pPrivate->pImage), pPixbuf);
- g_object_unref (pPixbuf);
- }
-
- gtk_widget_set_visible (pPrivate->pImage, sFilename != NULL);
- g_object_unref (pInfo);
+ gtk_image_set_from_gicon (GTK_IMAGE (pPrivate->pImage), pPrivate->pIcon, GTK_ICON_SIZE_MENU);
+ gtk_widget_set_visible (pPrivate->pImage, TRUE);
}
}