[polari] css: Add input bar top border on scroll up



commit 45f42f7359157a4612b53937ea2dd7f9b8d60aa7
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Tue Jul 5 16:15:03 2016 +0200

    css: Add input bar top border on scroll up
    
    Add a border on the undershoot bottom to add a visual break on top
    of the input bar when the user scrolls up.

 data/resources/application.css |    3 +++
 src/chatView.js                |    2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/data/resources/application.css b/data/resources/application.css
index 17b0a9c..2ce89b2 100644
--- a/data/resources/application.css
+++ b/data/resources/application.css
@@ -153,3 +153,6 @@
     border: solid @borders;
     border-width: 0 0 1px;
 }
+
+/* the following adds a border on top of the inputbar when users scroll up */
+.polari-chat-view > undershoot.bottom { border-bottom: 1px solid @borders; }
diff --git a/src/chatView.js b/src/chatView.js
index a789070..5a3cf3c 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -234,6 +234,8 @@ const ChatView = new Lang.Class({
     _init: function(room) {
         this.parent({ hscrollbar_policy: Gtk.PolicyType.NEVER, vexpand: true });
 
+        this.get_style_context().add_class('polari-chat-view');
+
         this._view = new TextView({ editable: false, cursor_visible: false,
                                     wrap_mode: Gtk.WrapMode.WORD_CHAR,
                                     right_margin: MARGIN });


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