placessidebar: Make all rows ellipsize
authorMatthias Clasen <mclasen@redhat.com>
Fri, 3 Feb 2023 09:00:03 +0000 (10:00 +0100)
committerSimon McVittie <smcv@debian.org>
Sat, 9 Sep 2023 19:32:02 +0000 (20:32 +0100)
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

Gbp-Pq: Name placessidebar-Make-all-rows-ellipsize.patch

gtk/gtksidebarrow.c
gtk/ui/gtksidebarrow.ui

index f2adfde4b8ddaf42fa8f33348139774213dc46ff..11ccf43ba7dd5d95dc32358a0b9b01e1f3f10576 100644 (file)
@@ -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:
index 046a1af08d5c418536866bd0192e8a1bfdf709c2..35217044725d5ef2ef20b868ad820035b47bbdab 100644 (file)
@@ -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>