summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2018-07-01 21:13:13 -0400
committerlukefromdc <[email protected]>2018-07-01 21:32:01 -0400
commit3820f05688734c96f0668760bd8bd62ebb1e6d34 (patch)
treea4710d6aacddbeac3bd255236a711057b6b16dda /applets
parent91f9afedff98445981cc4a70cf8050ac102c6b53 (diff)
downloadmate-panel-3820f05688734c96f0668760bd8bd62ebb1e6d34.tar.bz2
mate-panel-3820f05688734c96f0668760bd8bd62ebb1e6d34.tar.xz
GTK 3.23: don't cut tray icons too narrow in HiDPI mode
Code required to avoid spaces between tray icons with GTK 3.22 cuts tray icons in half with window-scaling=2 in GTK 3.23
Diffstat (limited to 'applets')
-rw-r--r--applets/notification_area/system-tray/na-tray-child.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/applets/notification_area/system-tray/na-tray-child.c b/applets/notification_area/system-tray/na-tray-child.c
index 2f5b7cd0..6efae8f8 100644
--- a/applets/notification_area/system-tray/na-tray-child.c
+++ b/applets/notification_area/system-tray/na-tray-child.c
@@ -115,6 +115,7 @@ na_tray_child_style_set (GtkWidget *widget,
*/
}
+#if !GTK_CHECK_VERSION (3, 23, 0)
static void
na_tray_child_get_preferred_width (GtkWidget *widget,
gint *minimal_width,
@@ -156,6 +157,7 @@ na_tray_child_get_preferred_height (GtkWidget *widget,
*minimal_height = *minimal_height / scale;
*natural_height = *natural_height / scale;
}
+#endif
/* The plug window should completely occupy the area of the child, so we won't
* get an expose event. But in case we do (the plug unmaps itself, say), this
@@ -382,8 +384,10 @@ na_tray_child_class_init (NaTrayChildClass *klass)
widget_class->style_set = na_tray_child_style_set;
widget_class->realize = na_tray_child_realize;
+#if !GTK_CHECK_VERSION (3, 23, 0)
widget_class->get_preferred_width = na_tray_child_get_preferred_width;
widget_class->get_preferred_height = na_tray_child_get_preferred_height;
+#endif
widget_class->draw = na_tray_child_draw;
/* we don't really care actually */