placessidebar: Make all rows ellipsize
authorMatthias Clasen <mclasen@redhat.com>
Fri, 3 Feb 2023 09:00:03 +0000 (10:00 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 3 Feb 2023 09:00:03 +0000 (10:00 +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.

Fixes: #4710
gtk/gtksidebarrow.c
gtk/ui/gtksidebarrow.ui

index 15224b03b82867fa83eb97ff12174228e4abcf1c..37cf167c9417a87c56f552233c401e53572a6bb7 100644 (file)
@@ -274,11 +274,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>