diff options
author | lukefromdc <[email protected]> | 2018-03-20 22:02:48 -0400 |
---|---|---|
committer | lukefromdc <[email protected]> | 2018-03-20 22:02:48 -0400 |
commit | 0b15ea1f6d218cc2a850bef3f0cb98d303c63bc3 (patch) | |
tree | bba116cfd9d1eafd505519762837d40fa4725e3d /applets/notification_area/system-tray/na-tray-child.c | |
parent | ff04f332136272a14c588da3f2d582ba0ff01be1 (diff) | |
download | mate-panel-0b15ea1f6d218cc2a850bef3f0cb98d303c63bc3.tar.bz2 mate-panel-0b15ea1f6d218cc2a850bef3f0cb98d303c63bc3.tar.xz |
hidpi: fix tray icon spacing with window-scaling > 1
Diffstat (limited to 'applets/notification_area/system-tray/na-tray-child.c')
-rw-r--r-- | applets/notification_area/system-tray/na-tray-child.c | 10 |
1 files changed, 10 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 46e6e412..47a45e90 100644 --- a/applets/notification_area/system-tray/na-tray-child.c +++ b/applets/notification_area/system-tray/na-tray-child.c @@ -120,6 +120,8 @@ na_tray_child_get_preferred_width (GtkWidget *widget, gint *minimal_width, gint *natural_width) { + gint scale; + scale = gtk_widget_get_scale_factor (widget); GTK_WIDGET_CLASS (na_tray_child_parent_class)->get_preferred_width (widget, minimal_width, natural_width); @@ -129,6 +131,9 @@ na_tray_child_get_preferred_width (GtkWidget *widget, if (*natural_width < 16) *natural_width = 16; + + *minimal_width = *minimal_width / scale; + *natural_width = *natural_width / scale; } static void @@ -136,6 +141,8 @@ na_tray_child_get_preferred_height (GtkWidget *widget, gint *minimal_height, gint *natural_height) { + gint scale; + scale = gtk_widget_get_scale_factor (widget); GTK_WIDGET_CLASS (na_tray_child_parent_class)->get_preferred_height (widget, minimal_height, natural_height); @@ -145,6 +152,9 @@ na_tray_child_get_preferred_height (GtkWidget *widget, if (*natural_height < 16) *natural_height = 16; + + *minimal_height = *minimal_height / scale; + *natural_height = *natural_height / scale; } static void |