From 090f8dd4ae3cde3ab4dff50275eeb6a3b32b837b Mon Sep 17 00:00:00 2001 From: jderose9 Date: Thu, 12 Jan 2017 09:21:09 -0500 Subject: [PATCH 1/2] Add panel position style class. Closes #21 --- panel.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/panel.js b/panel.js index 9571c01..6d5364e 100644 --- a/panel.js +++ b/panel.js @@ -291,8 +291,27 @@ const dtpPanel = new Lang.Class({ Main.overview._panelGhost.set_height(isTop ? size : 0); this._myPanelGhost.set_height(isTop ? 0 : size); - isTop ? this.panelBox.set_anchor_point(0, 0) : + + + if(isTop) { + this.panelBox.set_anchor_point(0, 0); + + // styles for theming + if(this.panel.actor.has_style_class_name('dashtopanelBottom')) + this.panel.actor.remove_style_class_name('dashtopanelBottom'); + + if(!this.panel.actor.has_style_class_name('dashtopanelTop')) + this.panel.actor.add_style_class_name('dashtopanelTop'); + } else { this.panelBox.set_anchor_point(0,(-1)*(Main.layoutManager.primaryMonitor.height-this.panelBox.height)); + + // styles for theming + if(this.panel.actor.has_style_class_name('dashtopanelTop')) + this.panel.actor.remove_style_class_name('dashtopanelTop'); + + if(!this.panel.actor.has_style_class_name('dashtopanelBottom')) + this.panel.actor.add_style_class_name('dashtopanelBottom'); + } }, _setActivitiesButtonVisible: function(isVisible) { From 744b829151cf168cd808991d4f7a790a758eb118 Mon Sep 17 00:00:00 2001 From: jderose9 Date: Thu, 12 Jan 2017 09:25:36 -0500 Subject: [PATCH 2/2] Add style class to focused app. Closes #20 --- taskbar.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/taskbar.js b/taskbar.js index 32cb6e2..c3c12bc 100644 --- a/taskbar.js +++ b/taskbar.js @@ -1333,6 +1333,7 @@ const taskbarAppIcon = new Lang.Class({ _onFocusAppChanged: function() { if(tracker.focus_app == this.app) { this._dot.opacity = 255; + this.actor.add_style_class_name('focused'); Tweener.addTween(this._dot, { width: this._iconContainer.get_width(), height: RUNNING_INDICATOR_SIZE, @@ -1346,6 +1347,7 @@ const taskbarAppIcon = new Lang.Class({ }); } else { this._dot.opacity = 255; + this.actor.remove_style_class_name('focused'); Tweener.addTween(this._dot, { width: 0, height: RUNNING_INDICATOR_SIZE,