[polari] chatView: Tweak text styling



commit 1af3ec5f1d6ab3ff8ce73a996f992a34daec1c11
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Jul 8 13:26:44 2016 +0200

    chatView: Tweak text styling
    
    The current styling emphasizes some secondary elements too much,
    while not emphasizing other important parts enough. Try to address
    this by:
     - making nicknames bold
     - use normal weight for timestamps
     - differentiate actions by using italic
       style instead of dimming their color
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768381

 data/resources/entry-area.ui |    3 +++
 src/chatView.js              |    9 ++++-----
 2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/data/resources/entry-area.ui b/data/resources/entry-area.ui
index 6fb045a..8748732 100644
--- a/data/resources/entry-area.ui
+++ b/data/resources/entry-area.ui
@@ -66,6 +66,9 @@
               <object class="GtkLabel" id="nickLabel">
                 <property name="visible">True</property>
                 <property name="xalign">0</property>
+                <attributes>
+                  <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+                </attributes>
               </object>
             </child>
             <child internal-child="accessible">
diff --git a/src/chatView.js b/src/chatView.js
index 867a7a7..4c70be0 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -354,7 +354,8 @@ const ChatView = new Lang.Class({
         let tagTable = buffer.get_tag_table();
         let tags = [
           { name: 'nick',
-            left_margin: MARGIN },
+            left_margin: MARGIN,
+            weight: Pango.Weight.BOLD },
           { name: 'gap',
             pixels_above_lines: 10 },
           { name: 'message',
@@ -368,10 +369,10 @@ const ChatView = new Lang.Class({
           { name: 'timestamp',
             left_margin: MARGIN,
             indent: 0,
-            weight: Pango.Weight.BOLD,
             justification: Gtk.Justification.RIGHT },
           { name: 'action',
-            left_margin: MARGIN },
+            left_margin: MARGIN,
+            style: Pango.Style.ITALIC },
           { name: 'url',
             underline: Pango.Underline.SINGLE },
           { name: 'indicator-line',
@@ -437,8 +438,6 @@ const ChatView = new Lang.Class({
             foreground_rgba: dimColor },
           { name: 'timestamp',
             foreground_rgba: dimColor },
-          { name: 'action',
-            foreground_rgba: dimColor },
           { name: 'url',
             foreground_rgba: linkColor }
         ];


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