[recipes] Improve cuisine tile labels slightly



commit bf62ad858bdd1a8caa8e69659a52a5909983e9d7
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jan 6 14:44:24 2017 -0500

    Improve cuisine tile labels slightly
    
    Don't let the text on the big tile unwrap all the way,
    the lines get just too long then. Cap it at 60 characters.

 src/gr-cuisine-tile.c  |    5 ++++-
 src/gr-cuisine-tile.ui |    5 +++--
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/gr-cuisine-tile.c b/src/gr-cuisine-tile.c
index 9a53231..e0d8b34 100644
--- a/src/gr-cuisine-tile.c
+++ b/src/gr-cuisine-tile.c
@@ -71,8 +71,11 @@ cuisine_tile_set_cuisine (GrCuisineTile *tile,
 
         gtk_label_set_label (GTK_LABEL (tile->title), title);
         gtk_label_set_label (GTK_LABEL (tile->description), description);
-        if (big)
+        if (big) {
                 gtk_label_set_lines (GTK_LABEL (tile->description), 3);
+                gtk_label_set_width_chars (GTK_LABEL (tile->description), 60);
+                gtk_label_set_max_width_chars (GTK_LABEL (tile->description), 60);
+        }
 
         context = gtk_widget_get_style_context (GTK_WIDGET (tile));
         gtk_style_context_add_class (context, cuisine);
diff --git a/src/gr-cuisine-tile.ui b/src/gr-cuisine-tile.ui
index 0f382f6..1c22dc4 100644
--- a/src/gr-cuisine-tile.ui
+++ b/src/gr-cuisine-tile.ui
@@ -43,8 +43,9 @@
                 <property name="visible">1</property>
                 <property name="yalign">0</property>
                 <property name="xalign">0</property>
-                <property name="width-chars">20</property>
-                <property name="max-width-chars">20</property>
+                <property name="halign">start</property>
+                <property name="width-chars">40</property>
+                <property name="max-width-chars">40</property>
                 <property name="ellipsize">end</property>
                 <property name="lines">2</property>
                 <style>


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