[gnome-applets] modemlights: fix icon size after setting EXPAND_MINOR flag
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets] modemlights: fix icon size after setting EXPAND_MINOR flag
- Date: Tue, 14 Apr 2015 09:19:58 +0000 (UTC)
commit a48fae73babab74b9549132c4a55b503a7cb5219
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Apr 14 12:16:15 2015 +0300
modemlights: fix icon size after setting EXPAND_MINOR flag
modemlights/modem-applet.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/modemlights/modem-applet.c b/modemlights/modem-applet.c
index 407a7a4..640f53c 100644
--- a/modemlights/modem-applet.c
+++ b/modemlights/modem-applet.c
@@ -238,6 +238,9 @@ modem_applet_size_allocate (GtkWidget *widget,
priv->size = allocation->width;
}
+ /* Make icon little smaller than panel size */
+ priv->size -= 4;
+
if (old_size == priv->size)
return;
@@ -246,7 +249,9 @@ modem_applet_size_allocate (GtkWidget *widget,
/* this might be too much overload, maybe should we get just one icon size and scale? */
priv->icon = gtk_icon_theme_load_icon (priv->icon_theme,
- "gnome-modem", priv->size, 0, NULL);
+ "gnome-modem", priv->size,
+ GTK_ICON_LOOKUP_FORCE_SIZE,
+ NULL);
gtk_image_set_from_pixbuf (GTK_IMAGE (priv->image), priv->icon);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]