[mate-panel] 02/03: debian/patches: Add 0004_fix_tray_icon_spacing.patch. Fix tray icon spacing with window-scaling > 1.

Martin Wimpress flexiondotorg-guest at moszumanska.debian.org
Thu Mar 22 11:02:13 UTC 2018


This is an automated email from the git hooks/post-receive script.

flexiondotorg-guest pushed a commit to branch master
in repository mate-panel.

commit d571650efb0ca3a05321b9a5ab21b527e75eb586
Author: Martin Wimpress <martin.wimpress at ubuntu.com>
Date:   Wed Mar 21 18:14:45 2018 +0000

    debian/patches: Add 0004_fix_tray_icon_spacing.patch. Fix tray icon spacing with window-scaling > 1.
---
 debian/patches/0004_fix_tray_icon_spacing.patch | 59 +++++++++++++++++++++++++
 debian/patches/series                           |  1 +
 2 files changed, 60 insertions(+)

diff --git a/debian/patches/0004_fix_tray_icon_spacing.patch b/debian/patches/0004_fix_tray_icon_spacing.patch
new file mode 100644
index 0000000..8a4b523
--- /dev/null
+++ b/debian/patches/0004_fix_tray_icon_spacing.patch
@@ -0,0 +1,59 @@
+Author: lukefromdc <lukefromdc at hushmail.com>
+Description: Fix tray icon spacing with window-scaling > 1
+
+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
+diff --git a/applets/notification_area/system-tray/na-tray.c b/applets/notification_area/system-tray/na-tray.c
+index 94fe6911..621d534d 100644
+--- a/applets/notification_area/system-tray/na-tray.c
++++ b/applets/notification_area/system-tray/na-tray.c
+@@ -127,7 +127,8 @@ tray_added (NaTrayManager *manager,
+ 
+   na_host_emit_item_added (NA_HOST (tray), NA_ITEM (icon));
+ 
+-  gtk_widget_show (GTK_WIDGET (icon));
++  /*Does not seem to be needed anymore and can cause a render issue with hidpi*/
++  /*gtk_widget_show (GTK_WIDGET (icon));*/
+ }
+ 
+ static void
diff --git a/debian/patches/series b/debian/patches/series
index 22dc69d..ca44b94 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0001_scale_monitor_geometries.patch
 0002_fix_out_process_applets_for_hidpi.patch
 0003_fix_rendering_of_out-of-process_window_list_with_hidpi.patch
+0004_fix_tray_icon_spacing.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/mate-panel.git



More information about the pkg-mate-commits mailing list