Fix truncation in places sidebar with large text accessibility setting
authorSimon McVittie <smcv@debian.org>
Sun, 20 Aug 2023 17:11:28 +0000 (18:11 +0100)
committerSimon McVittie <smcv@debian.org>
Sun, 20 Aug 2023 17:11:28 +0000 (18:11 +0100)
Add patch from upstream gtk-4-8 branch.

Closes: #1043261
debian/patches/placessidebar-Make-all-rows-ellipsize.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/placessidebar-Make-all-rows-ellipsize.patch b/debian/patches/placessidebar-Make-all-rows-ellipsize.patch
new file mode 100644 (file)
index 0000000..6c2dae3
--- /dev/null
@@ -0,0 +1,46 @@
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Fri, 3 Feb 2023 10:00:03 +0100
+Subject: placessidebar: Make all rows ellipsize
+
+Otherwise, we end up with a single long row
+pushing the content of all the other rows
+off to the left, which is much worse than
+ellipsizing.
+
+Bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/4710
+Bug-Debian: https://bugs.debian.org/1043261
+Applied-upstream: 4.9.3, commit:463f12a3bb42c60e2b86093f443d9d14541c9852
+Applied-upstream: 4.8.4, commit:c4ddf47d8f0625e23c5677a412bcc6ba585fa5a8
+---
+ gtk/gtksidebarrow.c     | 5 -----
+ gtk/ui/gtksidebarrow.ui | 1 +
+ 2 files changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/gtk/gtksidebarrow.c b/gtk/gtksidebarrow.c
+index f2adfde..11ccf43 100644
+--- a/gtk/gtksidebarrow.c
++++ b/gtk/gtksidebarrow.c
+@@ -278,11 +278,6 @@ gtk_sidebar_row_set_property (GObject      *object,
+     case PROP_SECTION_TYPE:
+       self->section_type = g_value_get_enum (value);
+-      if (self->section_type == GTK_PLACES_SECTION_COMPUTER ||
+-          self->section_type == GTK_PLACES_SECTION_OTHER_LOCATIONS)
+-        gtk_label_set_ellipsize (GTK_LABEL (self->label_widget), PANGO_ELLIPSIZE_NONE);
+-      else
+-        gtk_label_set_ellipsize (GTK_LABEL (self->label_widget), PANGO_ELLIPSIZE_END);
+       break;
+     case PROP_PLACE_TYPE:
+diff --git a/gtk/ui/gtksidebarrow.ui b/gtk/ui/gtksidebarrow.ui
+index 046a1af..3521704 100644
+--- a/gtk/ui/gtksidebarrow.ui
++++ b/gtk/ui/gtksidebarrow.ui
+@@ -25,6 +25,7 @@
+               <object class="GtkLabel" id="label_widget">
+                 <property name="hexpand">1</property>
+                 <property name="xalign">0</property>
++                <property name="ellipsize">end</property>
+                 <style>
+                   <class name="sidebar-label"/>
+                 </style>
index 790e36d151a072ecaec1d8d09d32418fe3b91b55..0792588e2bb24e95a3cf50f60d7190523d690ad4 100644 (file)
@@ -7,6 +7,7 @@ fontchooser-Drop-a-few-errant-translations.patch
 gtkcssanimatedstyle-Fix-return-of-new_advance.patch
 Update-Turkish-translation-2.patch
 gdk-x11-Reset-all-scroll-valuators-on-enter.patch
+placessidebar-Make-all-rows-ellipsize.patch
 testsuite-Use-separate-setups-for-unstable-tests-instead-.patch
 testsuite-Don-t-create-.test-files-for-flaky-or-failing-t.patch
 node-editor-Save-test-data-relative-to-current-working-di.patch