[nautilus/bz737372-set-min-tab-width: 2/2] notebook: Set minimum witdh for tabs



commit 6f592622a2b8d81a083c8255a0628e466d0859eb
Author: António Fernandes <antoniof gnome org>
Date:   Fri Feb 9 16:49:39 2018 +0000

    notebook: Set minimum witdh for tabs
    
    Currently, when there are many tabs, the tab label is fully
    ellipsized into an ellipsis.
    
    An ellipsis is not a useful tab label.
    
    Instead, set a minimum of 4 characters for the tab label.
    
    Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=737372

 src/nautilus-notebook.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/nautilus-notebook.c b/src/nautilus-notebook.c
index 8a9edab54..39d32a96f 100644
--- a/src/nautilus-notebook.c
+++ b/src/nautilus-notebook.c
@@ -315,8 +315,7 @@ build_tab_label (NautilusNotebook   *notebook,
     label = gtk_label_new (NULL);
     gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
     gtk_label_set_single_line_mode (GTK_LABEL (label), TRUE);
-    gtk_label_set_xalign (GTK_LABEL (label), 0.5);
-    gtk_label_set_yalign (GTK_LABEL (label), 0.5);
+    gtk_label_set_width_chars (GTK_LABEL (label), 4);
     gtk_box_pack_start (GTK_BOX (center_widget), label, FALSE, FALSE, 0);
     gtk_widget_show (label);
 


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