[mate-dock-applet] 01/06: debian/patches: Add 0001_hidpi.patch. Scale panel size when using HiDPI displays.
Martin Wimpress
flexiondotorg-guest at moszumanska.debian.org
Wed Feb 7 11:43:39 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-dock-applet.
commit 0831a78c6f9fa0513826827d1ceac0aaf67deb8b
Author: Martin Wimpress <martin.wimpress at ubuntu.com>
Date: Wed Feb 7 10:43:30 2018 +0000
debian/patches: Add 0001_hidpi.patch. Scale panel size when using HiDPI displays.
---
debian/patches/0000_hidpi.patch | 41 +++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 42 insertions(+)
diff --git a/debian/patches/0000_hidpi.patch b/debian/patches/0000_hidpi.patch
new file mode 100644
index 0000000..7ef0250
--- /dev/null
+++ b/debian/patches/0000_hidpi.patch
@@ -0,0 +1,41 @@
+Author: Victor Kareh <vkareh at vkareh.net>
+Description: Scale panel size when using HiDPI displays
+
+diff --git a/src/dock.in b/src/dock.in
+index 3247c5e..36ffa44 100644
+--- a/src/dock.in
++++ b/src/dock.in
+@@ -4263,6 +4263,11 @@ class Dock(object):
+ self.set_app_scroll_dirs(False)
+
+ alloc = self.applet.get_allocation()
++
++ # Scale panel size to accomodate dock on HiDPI displays
++ scale_factor = self.box.get_scale_factor()
++ panel_size = int(self.panel_size / scale_factor)
++
+ if self.panel_orient in ["top", "bottom"]:
+
+ # first set the min content width to 0 in case the new maximum we're going
+@@ -4272,8 +4277,8 @@ class Dock(object):
+ self.scrolled_win.set_min_content_width(ps)
+
+ self.scrolled_win.set_min_content_height(0)
+- self.scrolled_win.set_max_content_height(self.panel_size)
+- self.scrolled_win.set_min_content_height(self.panel_size)
++ self.scrolled_win.set_max_content_height(panel_size)
++ self.scrolled_win.set_min_content_height(panel_size)
+
+ else:
+ self.scrolled_win.set_min_content_height(0)
+@@ -4281,8 +4286,8 @@ class Dock(object):
+ self.scrolled_win.set_min_content_height(ps)
+
+ self.scrolled_win.set_min_content_width(0)
+- self.scrolled_win.set_max_content_width(self.panel_size)
+- self.scrolled_win.set_min_content_width(self.panel_size)
++ self.scrolled_win.set_max_content_width(panel_size)
++ self.scrolled_win.set_min_content_width(panel_size)
+
+ def get_max_visible_apps(self):
+ """ Gets the maximum number of whole app icons the dock can display in the available
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8f7d3a1
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0000_hidpi.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/mate-dock-applet.git
More information about the pkg-mate-commits
mailing list