[polari/wip/fmuellner/debug-instance: 3/3] window: Differentiate debug instances from normal ones



commit 14518a93d28b64705816990c03ce52f6e168ffab
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Mar 23 02:20:55 2017 +0100

    window: Differentiate debug instances from normal ones
    
    When running a debug instance alongside the regular Polari instance,
    it is easy to lose track of which is the temporary one. Address this
    by adding some subtle styling hints in the debug instance's title bar.
    
    Fixes https://gitlab.gnome.org/GNOME/polari/issues/24

 data/resources/application.css | 10 ++++++++++
 src/mainWindow.js              |  3 +++
 2 files changed, 13 insertions(+)
---
diff --git a/data/resources/application.css b/data/resources/application.css
index a5170e1..2a5a22e 100644
--- a/data/resources/application.css
+++ b/data/resources/application.css
@@ -203,6 +203,16 @@ treeview.polari-server-room-list {
 .polari-user-popover-nick { font-weight: bold; }
 .polari-user-popover-status { font-size: smaller; }
 
+
 .polari-room-loading {
     opacity: 0.3;
 }
+
+/* Differentiate debug instance from "normal" ones */
+window.debug headerbar:last-child {
+    background-image: -gtk-icontheme('dialog-warning-symbolic');
+    background-blend-mode: overlay;
+    background-repeat: no-repeat;
+    background-position: 1em center;
+    background-size: 6em;
+}
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 38bdf4d..21adaa1 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -137,6 +137,9 @@ var MainWindow = GObject.registerClass({
         this._overlay.add_overlay(app.notificationQueue);
         this._overlay.add_overlay(app.commandOutputQueue);
 
+        if (app.isDebugInstance)
+            this.get_style_context().add_class('debug');
+
         // command output notifications should not pop up over
         // the input area, but appear to emerge from it, so
         // set up an appropriate margin


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