[gnome-user-share/wip/antoniof/ellipsize-share-bar-label] nautilus-share-bar: Ellipsize label




commit 80f8e50315da6a480a3e864e986c8acacf95e5f9
Author: António Fernandes <antoniojpfernandes gmail com>
Date:   Sun Jan 10 13:20:01 2021 +0000

    nautilus-share-bar: Ellipsize label
    
    Long labels can force the nautilus window to become too wide.
    
    Allow ellipsization to prevent this disruption of window sizing.
    
    Fixes https://gitlab.gnome.org/GNOME/gnome-user-share/-/issues/26

 src/nautilus-share-bar.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/src/nautilus-share-bar.c b/src/nautilus-share-bar.c
index 5875086..097c73c 100644
--- a/src/nautilus-share-bar.c
+++ b/src/nautilus-share-bar.c
@@ -105,6 +105,7 @@ nautilus_share_bar_init (NautilusShareBar *bar)
         gtk_container_add (GTK_CONTAINER (vbox), label);
 
         bar->priv->label = gtk_label_new (NULL);
+        gtk_label_set_ellipsize (GTK_LABEL (bar->priv->label), PANGO_ELLIPSIZE_END);
         gtk_widget_set_halign (bar->priv->label, GTK_ALIGN_START);
         gtk_widget_show (bar->priv->label);
         gtk_container_add (GTK_CONTAINER (vbox), bar->priv->label);


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