Skip to content

Commit b8c0dde

Browse files
lukefromdcraveit65
authored andcommitted
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
1 parent a5a079b commit b8c0dde

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

applets/notification_area/system-tray/na-tray-child.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ na_tray_child_style_set (GtkWidget *widget,
115115
*/
116116
}
117117

118+
#if !GTK_CHECK_VERSION (3, 23, 0)
118119
static void
119120
na_tray_child_get_preferred_width (GtkWidget *widget,
120121
gint *minimal_width,
@@ -156,6 +157,7 @@ na_tray_child_get_preferred_height (GtkWidget *widget,
156157
*minimal_height = *minimal_height / scale;
157158
*natural_height = *natural_height / scale;
158159
}
160+
#endif
159161

160162
/* The plug window should completely occupy the area of the child, so we won't
161163
* 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)
382384

383385
widget_class->style_set = na_tray_child_style_set;
384386
widget_class->realize = na_tray_child_realize;
387+
#if !GTK_CHECK_VERSION (3, 23, 0)
385388
widget_class->get_preferred_width = na_tray_child_get_preferred_width;
386389
widget_class->get_preferred_height = na_tray_child_get_preferred_height;
390+
#endif
387391
widget_class->draw = na_tray_child_draw;
388392

389393
/* we don't really care actually */

0 commit comments

Comments
 (0)