[gnome-control-center] notifications: Ellipsize the labels



commit 587ca5ce9823c46125aee5ebdf76775e20585376
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Tue Nov 27 09:25:12 2018 +0100

    notifications: Ellipsize the labels
    
    This will help the window to fit narrow screens even with long
    application names.

 panels/notifications/cc-notifications-panel.c  | 2 ++
 panels/notifications/cc-notifications-panel.ui | 2 ++
 2 files changed, 4 insertions(+)
---
diff --git a/panels/notifications/cc-notifications-panel.c b/panels/notifications/cc-notifications-panel.c
index 83a2fdbee..8a30986d2 100644
--- a/panels/notifications/cc-notifications-panel.c
+++ b/panels/notifications/cc-notifications-panel.c
@@ -324,6 +324,8 @@ add_application (CcNotificationsPanel *panel,
 
   w = gtk_label_new (app_name);
   gtk_widget_show (w);
+  gtk_label_set_ellipsize (GTK_LABEL (w), PANGO_ELLIPSIZE_END);
+  gtk_label_set_xalign (GTK_LABEL (w), 0.0f);
   gtk_container_add (GTK_CONTAINER (box), w);
 
   w = gtk_label_new ("");
diff --git a/panels/notifications/cc-notifications-panel.ui b/panels/notifications/cc-notifications-panel.ui
index 8b13d3f6b..1298bb164 100644
--- a/panels/notifications/cc-notifications-panel.ui
+++ b/panels/notifications/cc-notifications-panel.ui
@@ -65,6 +65,7 @@
                                         <property name="margin_top">8</property>
                                         <property name="margin_bottom">8</property>
                                         <property name="hexpand">True</property>
+                                        <property name="ellipsize">end</property>
                                         <property name="xalign">0</property>
                                         <property name="label" translatable="yes">Notification 
_Popups</property>
                                         <property name="use_underline">True</property>
@@ -115,6 +116,7 @@
                                         <property name="margin_top">8</property>
                                         <property name="margin_bottom">8</property>
                                         <property name="hexpand">True</property>
+                                        <property name="ellipsize">end</property>
                                         <property name="xalign">0</property>
                                         <property name="label" translatable="yes">_Lock Screen 
Notifications</property>
                                         <property name="use_underline">True</property>


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