[gnome-control-center/gbsneto/fix-long-user-names: 2/2] user-accounts: Ellipsize user name label



commit 473df9736727c8833a55908868677e683cb56bf9
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Feb 7 16:07:52 2019 -0200

    user-accounts: Ellipsize user name label
    
    In the User Accounts panel's carousel, longer user names
    push the window geometry to super wide levels -- even with
    the 255-char limitation in place.
    
    Fix that by ellipsizing the user name label.

 panels/user-accounts/cc-user-panel.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/panels/user-accounts/cc-user-panel.c b/panels/user-accounts/cc-user-panel.c
index f71e83b1a..4c3039d22 100644
--- a/panels/user-accounts/cc-user-panel.c
+++ b/panels/user-accounts/cc-user-panel.c
@@ -204,6 +204,7 @@ create_carousel_entry (CcUserPanel *self, ActUser *user)
                                  get_real_or_user_name (user));
         widget = gtk_label_new (label);
         gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
+        gtk_label_set_ellipsize (GTK_LABEL (widget), PANGO_ELLIPSIZE_END);
         gtk_widget_set_margin_top (widget, 5);
         gtk_box_pack_start (GTK_BOX (box), widget, FALSE, TRUE, 0);
         g_free (label);


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