Resume usage of main panel on primary monitor

This commit is contained in:
Charles Gagnon
2019-12-28 22:02:17 -05:00
parent 77ae9ca855
commit 9dd4a021d1
6 changed files with 207 additions and 145 deletions

View File

@@ -37,10 +37,10 @@ var DynamicTransparency = Utils.defineClass({
this._windowOverlap = false;
this.currentBackgroundColor = 0;
this._initialPanelStyle = dtpPanel.get_style();
this._initialPanelStyle = dtpPanel.panel.actor.get_style();
if (this._dtpPanel._leftCorner) {
this._initialPanelCornerStyle = dtpPanel._leftCorner.actor.get_style();
if (this._dtpPanel.panel._leftCorner) {
this._initialPanelCornerStyle = dtpPanel.panel._leftCorner.actor.get_style();
}
this._signalsHandler = new Utils.GlobalSignalsHandler();
@@ -55,11 +55,11 @@ var DynamicTransparency = Utils.defineClass({
this._signalsHandler.destroy();
this._proximityManager.removeWatch(this._proximityWatchId);
this._dtpPanel.set_style(this._initialPanelStyle);
this._dtpPanel.panel.actor.set_style(this._initialPanelStyle);
if (this._dtpPanel._leftCorner) {
this._dtpPanel._leftCorner.actor.set_style(this._initialPanelCornerStyle);
this._dtpPanel._rightCorner.actor.set_style(this._initialPanelCornerStyle);
if (this._dtpPanel.panel._leftCorner) {
this._dtpPanel.panel._leftCorner.actor.set_style(this._initialPanelCornerStyle);
this._dtpPanel.panel._rightCorner.actor.set_style(this._initialPanelCornerStyle);
}
},
@@ -176,7 +176,7 @@ var DynamicTransparency = Utils.defineClass({
},
_updateComplementaryStyles: function() {
let panelThemeNode = this._dtpPanel.get_theme_node();
let panelThemeNode = this._dtpPanel.panel.actor.get_theme_node();
this._complementaryStyles = 'border-radius: ' + panelThemeNode.get_border_radius(0) + 'px;';
},
@@ -215,16 +215,16 @@ var DynamicTransparency = Utils.defineClass({
let transition = 'transition-duration:' + this.animationDuration;
let cornerStyle = '-panel-corner-background-color: ' + this.currentBackgroundColor + transition;
this._dtpPanel.bg.set_style('background-color: ' + this.currentBackgroundColor + transition + this._complementaryStyles);
this._dtpPanel.set_style('background-color: ' + this.currentBackgroundColor + transition + this._complementaryStyles);
if (this._dtpPanel._leftCorner) {
this._dtpPanel._leftCorner.actor.set_style(cornerStyle);
this._dtpPanel._rightCorner.actor.set_style(cornerStyle);
if (this._dtpPanel.panel._leftCorner) {
this._dtpPanel.panel._leftCorner.actor.set_style(cornerStyle);
this._dtpPanel.panel._rightCorner.actor.set_style(cornerStyle);
}
},
_setGradient: function() {
this._dtpPanel.set_style(
this._dtpPanel.panel.actor.set_style(
'background: none; ' +
'border-image: none; ' +
'background-image: none; ' +