[gnome-control-center] color: Make the row labels ellipsizable



commit b4520d07b5b7897e0ca750ac78fee6dc90292d00
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Tue Jan 22 00:01:16 2019 +0100

    color: Make the row labels ellipsizable
    
    This better allows to better handle a narrow window.

 panels/color/cc-color-device.c  | 2 ++
 panels/color/cc-color-profile.c | 2 ++
 2 files changed, 4 insertions(+)
---
diff --git a/panels/color/cc-color-device.c b/panels/color/cc-color-device.c
index ee3d1e898..e35e5b1e3 100644
--- a/panels/color/cc-color-device.c
+++ b/panels/color/cc-color-device.c
@@ -274,6 +274,8 @@ cc_color_device_init (CcColorDevice *color_device)
   gtk_widget_set_margin_top (color_device->widget_description, 12);
   gtk_widget_set_margin_bottom (color_device->widget_description, 12);
   gtk_widget_set_halign (color_device->widget_description, GTK_ALIGN_START);
+  gtk_label_set_ellipsize (GTK_LABEL (color_device->widget_description), PANGO_ELLIPSIZE_END);
+  gtk_label_set_xalign (GTK_LABEL (color_device->widget_description), 0);
   gtk_box_pack_start (GTK_BOX (box), color_device->widget_description, TRUE, TRUE, 0);
 
   /* switch */
diff --git a/panels/color/cc-color-profile.c b/panels/color/cc-color-profile.c
index e4d510dbf..6d835b41a 100644
--- a/panels/color/cc-color-profile.c
+++ b/panels/color/cc-color-profile.c
@@ -455,6 +455,8 @@ cc_color_profile_init (CcColorProfile *color_profile)
   gtk_widget_set_margin_top (color_profile->widget_description, 9);
   gtk_widget_set_margin_bottom (color_profile->widget_description, 9);
   gtk_widget_set_halign (color_profile->widget_description, GTK_ALIGN_START);
+  gtk_label_set_ellipsize (GTK_LABEL (color_profile->widget_description), PANGO_ELLIPSIZE_END);
+  gtk_label_set_xalign (GTK_LABEL (color_profile->widget_description), 0);
   gtk_box_pack_start (GTK_BOX (box), color_profile->widget_description, TRUE, TRUE, 0);
   gtk_widget_show (color_profile->widget_description);
 


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