[polari/wip/fmuellner/debug-instance: 4/4] window: Differentiate debug instances from normal ones
- From: Gitlab Administrative User <gitlab src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/debug-instance: 4/4] window: Differentiate debug instances from normal ones
- Date: Thu, 9 Nov 2017 13:39:29 +0000 (UTC)
commit 646f775dbc2c65aff3c26eaa5fb6814497f9f645
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 | 9 +++++++++
src/mainWindow.js | 3 +++
2 files changed, 12 insertions(+)
---
diff --git a/data/resources/application.css b/data/resources/application.css
index 30474c5..c86867b 100644
--- a/data/resources/application.css
+++ b/data/resources/application.css
@@ -202,3 +202,12 @@ treeview.polari-server-room-list {
/* tweak labels in the user popover */
.polari-user-popover-nick { font-weight: bold; }
.polari-user-popover-status { font-size: smaller; }
+
+/* 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 c59a3c3..1b95e38 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -139,6 +139,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]