[epiphany/wip/exalm/bookmarks-popover: 2/2] bookmarks-popover: Ellipsize long tags




commit 957586ad913a190f74bc946fa9538dcc075afaea
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Sep 23 22:23:01 2020 +0500

    bookmarks-popover: Ellipsize long tags
    
    Make sure long tags don't stretch the popover either.

 src/bookmarks/ephy-bookmarks-popover.c | 2 ++
 src/resources/gtk/bookmarks-popover.ui | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/bookmarks/ephy-bookmarks-popover.c b/src/bookmarks/ephy-bookmarks-popover.c
index 4fc24f293..0c34a4fe5 100644
--- a/src/bookmarks/ephy-bookmarks-popover.c
+++ b/src/bookmarks/ephy-bookmarks-popover.c
@@ -244,6 +244,8 @@ create_tag_row (const char *tag)
   }
   label = gtk_label_new (tag);
 
+  gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
+
   gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
   gtk_box_pack_start (GTK_BOX (box), label, TRUE, FALSE, 0);
 
diff --git a/src/resources/gtk/bookmarks-popover.ui b/src/resources/gtk/bookmarks-popover.ui
index 3e1498d35..64091333c 100644
--- a/src/resources/gtk/bookmarks-popover.ui
+++ b/src/resources/gtk/bookmarks-popover.ui
@@ -111,9 +111,10 @@
                     </child>
                     <child>
                       <object class="GtkLabel" id="tag_detail_label">
-                        <property name="halign">center</property>
-                        <property name="hexpand">true</property>
                         <property name="visible">true</property>
+                        <property name="ellipsize">end</property>
+                        <property name="max-width-chars">0</property>
+                        <property name="hexpand">True</property>
                         <attributes>
                           <attribute name="weight" value="bold"/>
                         </attributes>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]