[geary/wip/730682-refine-convo-list] Style conversation list subject using CSS, add some whitespace above.



commit 5b89041aa4523b9386d560f269739e0f7686e917
Author: Michael James Gratton <mike vee net>
Date:   Fri Jan 5 16:09:12 2018 +1100

    Style conversation list subject using CSS, add some whitespace above.

 .../conversation-list/conversation-list-item.vala  |    5 -----
 ui/conversation-list-item.ui                       |    3 +++
 ui/geary.css                                       |    8 ++++++++
 3 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/src/client/conversation-list/conversation-list-item.vala 
b/src/client/conversation-list/conversation-list-item.vala
index b2f65f3..0f62dc4 100644
--- a/src/client/conversation-list/conversation-list-item.vala
+++ b/src/client/conversation-list/conversation-list-item.vala
@@ -215,11 +215,6 @@ public class ConversationListItem : Gtk.ListBoxRow {
         );
 
         if (preview_message != null) {
-            Pango.AttrList attrs = new Pango.AttrList();
-            if (this.conversation.is_unread()) {
-                attrs.insert(Pango.attr_weight_new(Pango.Weight.BOLD));
-            }
-            this.subject.set_attributes(attrs);
             this.subject.set_text(Geary.String.reduce_whitespace(
                 EmailUtil.strip_subject_prefixes(preview_message)
             ));
diff --git a/ui/conversation-list-item.ui b/ui/conversation-list-item.ui
index a744422..88b5856 100644
--- a/ui/conversation-list-item.ui
+++ b/ui/conversation-list-item.ui
@@ -37,6 +37,9 @@
             <property name="ellipsize">end</property>
             <property name="single_line_mode">True</property>
             <property name="xalign">0</property>
+            <style>
+              <class name="geary-subject"/>
+            </style>
           </object>
           <packing>
             <property name="left_attach">2</property>
diff --git a/ui/geary.css b/ui/geary.css
index 224caf3..78ab050 100644
--- a/ui/geary.css
+++ b/ui/geary.css
@@ -106,6 +106,14 @@ row.geary-folder-popover-list-row > label {
   margin-left: 6px;
 }
 
+.geary-conversation-list-item label.geary-subject {
+  margin-top: 2px;
+}
+
+.geary-conversation-list-item.geary-unread label.geary-subject {
+  font-weight: bold;
+}
+
 .geary-conversation-list-item label.geary-count {
   padding: 2px 6px;
   border-radius: 2px;


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