[geary/wip/765516-gtk-widget-conversation-viewer: 108/119] Ensure conversation messages min width is low enough for small screens.



commit 0f544f1e094caf112bb6f366bfcfe0c8f5d4aadf
Author: Michael James Gratton <mike vee net>
Date:   Fri Aug 12 00:01:00 2016 +1000

    Ensure conversation messages min width is low enough for small screens.
    
    * src/client/conversation-viewer/conversation-message.vala
      (AddressFlowBoxChild): Enable ellipsizing the label. Set the alignment
      so labels are correctly aligned at narrow widths. Removed some cruft.
    
    * ui/conversation-message.ui: Ensure long words in subject are
      wrapped. Ensure there's always at least two cols for recipient address
      flow boxes.

 .../conversation-viewer/conversation-message.vala  |    6 ++----
 ui/conversation-message.ui                         |    5 +++--
 2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-message.vala 
b/src/client/conversation-viewer/conversation-message.vala
index c39addc..ca43686 100644
--- a/src/client/conversation-viewer/conversation-message.vala
+++ b/src/client/conversation-viewer/conversation-message.vala
@@ -28,9 +28,8 @@ public class ConversationMessage : Gtk.Box {
             this.address = address;
 
             Gtk.Label label = new Gtk.Label(null);
-            //label.set_halign(Gtk.Align.START);
-            //label.set_valign(Gtk.Align.BASELINE);
-            //label.set_xalign(0.0f);
+            label.ellipsize = Pango.EllipsizeMode.END;
+            label.set_xalign(0.0f);
 
             string name = Geary.HTML.escape_markup(address.name);
             string addr = Geary.HTML.escape_markup(address.address);
@@ -47,7 +46,6 @@ public class ConversationMessage : Gtk.Box {
 
             add(label);
             set_halign(Gtk.Align.START);
-            //child.set_valign(Gtk.Align.START);
             show_all();
         }
 
diff --git a/ui/conversation-message.ui b/ui/conversation-message.ui
index 74f8f40..85e07a0 100644
--- a/ui/conversation-message.ui
+++ b/ui/conversation-message.ui
@@ -198,6 +198,7 @@
                             <property name="halign">start</property>
                             <property name="label" translatable="yes">Subject</property>
                             <property name="wrap">True</property>
+                            <property name="wrap_mode">word-char</property>
                             <property name="selectable">True</property>
                             <property name="xalign">0</property>
                             <style>
@@ -238,7 +239,7 @@
                                 <property name="valign">start</property>
                                 <property name="hexpand">False</property>
                                 <property name="column_spacing">2</property>
-                                <property name="min_children_per_line">1</property>
+                                <property name="min_children_per_line">2</property>
                                 <property name="max_children_per_line">4</property>
                                 <property name="selection_mode">none</property>
                                 <style>
@@ -286,7 +287,7 @@
                                 <property name="valign">start</property>
                                 <property name="hexpand">False</property>
                                 <property name="column_spacing">2</property>
-                                <property name="min_children_per_line">1</property>
+                                <property name="min_children_per_line">2</property>
                                 <property name="max_children_per_line">4</property>
                                 <property name="selection_mode">none</property>
                                 <style>


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