[polari] roomList: Dim inactive rooms



commit ccbce58d0b860d966c2615151fa67835649898dc
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Oct 12 01:48:38 2013 +0200

    roomList: Dim inactive rooms
    
    With the counters now indicating unread highlighted messages only,
    we no longer have any visual distinction between active and inactive
    rooms. Bring this back, but de-emphasize inactive rooms rather than
    highlighting active ones.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=709842

 data/resources/application.css |    8 ++++++++
 src/roomList.js                |    5 +++++
 2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/data/resources/application.css b/data/resources/application.css
index f0e7150..e82a8e3 100644
--- a/data/resources/application.css
+++ b/data/resources/application.css
@@ -44,6 +44,14 @@
     color: @theme_unfocused_text_color;
 }
 
+.polari-room-list .list-row.inactive {
+    color: alpha(@theme_text_color, 0.4);
+}
+
+.polari-room-list .list-row.inactive:backdrop {
+    color: alpha(@theme_unfocused_text_color, 0.4);
+}
+
 .polari-room-list .list-row .pending-messages-count {
     color: @theme_selected_fg_color;
     background-color: mix(@theme_selected_bg_color, @theme_selected_fg_color, 0.3);
diff --git a/src/roomList.js b/src/roomList.js
index 0d2c022..93214db 100644
--- a/src/roomList.js
+++ b/src/roomList.js
@@ -59,6 +59,11 @@ const RoomRow = new Lang.Class({
         this._counter.label = numPendingHighlights.toString();
         this._counter.opacity = numPendingHighlights > 0 ? 1. : 0.;
 
+        let context = this.widget.get_style_context();
+        if (pending.length == 0)
+            context.add_class('inactive');
+        else
+            context.remove_class('inactive');
     },
 
     _onSelectionModeChanged: function() {


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