diff options
Diffstat (limited to 'extensions/46/vertical-workspaces/lib/panel.js')
-rw-r--r-- | extensions/46/vertical-workspaces/lib/panel.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/extensions/46/vertical-workspaces/lib/panel.js b/extensions/46/vertical-workspaces/lib/panel.js index f78ab6f..ba6d01a 100644 --- a/extensions/46/vertical-workspaces/lib/panel.js +++ b/extensions/46/vertical-workspaces/lib/panel.js @@ -47,7 +47,9 @@ export const PanelModule = class { if (conflict && !reset) console.warn(`[${Me.metadata.name}] Warning: "Panel" module disabled due to potential conflict with another extension`); - reset = reset || !this.moduleEnabled || conflict || Main.sessionMode.isLocked; + reset = reset || !this.moduleEnabled || conflict; + + this.moduleEnabled = !reset; // don't touch original code if module disabled if (reset && !this._firstActivation) { @@ -69,13 +71,13 @@ export const PanelModule = class { this._setPanelPosition(); this._updateStyleChangedConnection(); - if (opt.PANEL_MODE === 0) { + if (!opt.PANEL_MODE) { this._updateOverviewConnection(true); this._reparentPanel(false); panelBox.translation_y = 0; Main.panel.opacity = 255; this._setPanelStructs(true); - } else if (opt.PANEL_MODE === 1) { + } else if (opt.PANEL_OVERVIEW_ONLY) { if (opt.SHOW_WS_PREVIEW_BG) { this._reparentPanel(true); if (opt.OVERVIEW_MODE2) { @@ -83,8 +85,6 @@ export const PanelModule = class { Main.layoutManager.overviewGroup.set_child_above_sibling(panelBox, null); this._updateOverviewConnection(); } else { - // otherwise move the panel below overviewGroup so it can get below workspacesDisplay - Main.layoutManager.overviewGroup.set_child_below_sibling(panelBox, Main.overview._overview); this._updateOverviewConnection(true); } this._showPanel(true); @@ -95,13 +95,13 @@ export const PanelModule = class { this._updateOverviewConnection(); } // _connectPanel(); - } else if (opt.PANEL_MODE === 2) { + } else if (opt.PANEL_DISABLED) { this._updateOverviewConnection(true); this._reparentPanel(false); this._showPanel(false); // _connectPanel(); } - this._setPanelStructs(opt.PANEL_MODE === 0); + this._setPanelStructs(!opt.PANEL_MODE); Main.layoutManager._updateHotCorners(); this._overrides.addOverride('ActivitiesButton', Main.panel.statusArea.activities, ActivitiesButton); @@ -147,7 +147,7 @@ export const PanelModule = class { } } else if (!this._styleChangedConId) { this._styleChangedConId = Main.panel.connect('style-changed', () => { - if (opt.PANEL_MODE === 1 && !opt.OVERVIEW_MODE2) + if (opt.PANEL_OVERVIEW_ONLY && !opt.OVERVIEW_MODE2) Main.panel.add_style_pseudo_class('overview'); else if (opt.OVERVIEW_MODE2) Main.panel.remove_style_pseudo_class('overview'); @@ -185,10 +185,10 @@ export const PanelModule = class { _reparentPanel(reparent = false) { const panel = Main.layoutManager.panelBox; - if (reparent && panel.get_parent() === Main.layoutManager.uiGroup) { + if (reparent && panel.get_parent() === Main.layoutManager.uiGroup && !Main.sessionMode.isLocked) { Main.layoutManager.uiGroup.remove_child(panel); Main.layoutManager.overviewGroup.add_child(panel); - } else if (!reparent && panel.get_parent() === Main.layoutManager.overviewGroup) { + } else if ((!reparent || Main.sessionMode.isLocked) && panel.get_parent() === Main.layoutManager.overviewGroup) { Main.layoutManager.overviewGroup.remove_child(panel); // return the panel at default position, panel shouldn't cover objects that should be above Main.layoutManager.uiGroup.insert_child_at_index(panel, 4); @@ -217,17 +217,17 @@ export const PanelModule = class { duration: ANIMATION_TIME, translation_y: 0, onComplete: () => { - this._setPanelStructs(opt.PANEL_MODE === 0); + this._setPanelStructs(!opt.PANEL_MODE); }, }); - } else { + } else if (!Main.layoutManager._startingUp) { const panelHeight = Main.panel.height; Main.layoutManager.panelBox.ease({ duration: ANIMATION_TIME, translation_y: opt.PANEL_POSITION_TOP ? -panelHeight + 1 : panelHeight - 1, onComplete: () => { Main.panel.opacity = 0; - this._setPanelStructs(opt.PANEL_MODE === 0); + this._setPanelStructs(!opt.PANEL_MODE); }, }); } |