summaryrefslogtreecommitdiff
path: root/applets/notification_area/status-notifier/sn-item-v0.c
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-12-27 14:09:24 -0500
committermonsta <[email protected]>2018-01-06 14:46:42 +0300
commitced73759eb90429eef218beb0e4b323bf05cff13 (patch)
tree5ae38929135f7b79579e3fbb35eea607f80a2d01 /applets/notification_area/status-notifier/sn-item-v0.c
parent4a8f8e895d1562f182c23714e77a0fb46257ed54 (diff)
downloadmate-panel-ced73759eb90429eef218beb0e4b323bf05cff13.tar.bz2
mate-panel-ced73759eb90429eef218beb0e4b323bf05cff13.tar.xz
status-notifier: handle wrong-size icons called by path
Ensure icons called by filename and path instead of icon-name get scaled to match other tray icons
Diffstat (limited to 'applets/notification_area/status-notifier/sn-item-v0.c')
-rw-r--r--applets/notification_area/status-notifier/sn-item-v0.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/applets/notification_area/status-notifier/sn-item-v0.c b/applets/notification_area/status-notifier/sn-item-v0.c
index e01d624d..f8657137 100644
--- a/applets/notification_area/status-notifier/sn-item-v0.c
+++ b/applets/notification_area/status-notifier/sn-item-v0.c
@@ -256,6 +256,10 @@ update (SnItemV0 *v0)
if (!pixbuf){
/*try to find icons specified by path and filename*/
pixbuf = gdk_pixbuf_new_from_file(v0->icon_name, NULL);
+ if (pixbuf){
+ /*An icon specified by path and filename may be the wrong size for the tray */
+ pixbuf=gdk_pixbuf_scale_simple(pixbuf, icon_size-2, icon_size-2,GDK_INTERP_BILINEAR);
+ }
}
if (!pixbuf){
/*deal with missing icon or failure to load icon*/