[polari/wip/fmuellner/debug-instance: 3/3] window: Differentiate test instances from normal ones
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/debug-instance: 3/3] window: Differentiate test instances from normal ones
- Date: Mon, 19 Feb 2018 20:43:39 +0000 (UTC)
commit cfc08ae0ef5fea78552043a88a90dc1ca3fa652f
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Mar 23 02:20:55 2017 +0100
window: Differentiate test instances from normal ones
When running a test 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 test instance's title bar.
Fixes https://gitlab.gnome.org/GNOME/polari/issues/24
data/resources/application.css | 9 +++++++++
src/mainWindow.js | 3 +++
2 files changed, 12 insertions(+)
---
diff --git a/data/resources/application.css b/data/resources/application.css
index a5170e1..668a2a1 100644
--- a/data/resources/application.css
+++ b/data/resources/application.css
@@ -206,3 +206,12 @@ treeview.polari-server-room-list {
.polari-room-loading {
opacity: 0.3;
}
+
+/* Differentiate test instance from "normal" ones */
+window.test-instance 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 b03a7e6..9fc14dc 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.isTestInstance)
+ this.get_style_context().add_class('test-instance');
+
// 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]