1
0
Fork 0

Updating 47/vertical-workspaces to version 47.5+20250210 [b14ba3cf].

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-03-24 19:45:01 +01:00
parent 297ae772ab
commit 6b0458069f
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
26 changed files with 5479 additions and 3202 deletions

View file

@ -3,7 +3,7 @@
* panel.js
*
* @author GdH <G-dH@github.com>
* @copyright 2022 - 2024
* @copyright 2022 - 2025
* @license GPL-3.0
*
*/
@ -67,6 +67,7 @@ export const PanelModule = class {
this._overrides = new Me.Util.Overrides();
const panelBox = Main.layoutManager.panelBox;
panelBox.scale_y = 1;
this._setPanelPosition();
this._updateStyleChangedConnection();
@ -80,29 +81,23 @@ export const PanelModule = class {
} else if (opt.PANEL_OVERVIEW_ONLY) {
if (opt.SHOW_WS_PREVIEW_BG) {
this._reparentPanel(true);
if (opt.OVERVIEW_MODE2) {
// in OM2 if the panel has been moved to the overviewGroup move panel above all
Main.layoutManager.overviewGroup.set_child_above_sibling(panelBox, null);
this._updateOverviewConnection();
} else {
this._updateOverviewConnection(true);
}
this._showPanel(true);
} else {
// if ws preview bg is disabled, panel can stay in uiGroup
this._reparentPanel(false);
this._showPanel(false);
this._updateOverviewConnection();
}
this._updateOverviewConnection();
// _connectPanel();
} else if (opt.PANEL_DISABLED) {
this._updateOverviewConnection(true);
this._reparentPanel(false);
this._showPanel(false);
panelBox.scale_y = 0;
// _connectPanel();
}
this._setPanelStructs(!opt.PANEL_MODE);
Main.layoutManager._updateHotCorners();
Main.overview._overview.controls.layoutManager._updateWorkAreaBox();
this._overrides.addOverride('ActivitiesButton', Main.panel.statusArea.activities, ActivitiesButton);
@ -118,6 +113,7 @@ export const PanelModule = class {
this._updateStyleChangedConnection(reset);
const panelBox = Main.layoutManager.panelBox;
panelBox.scale_y = 1;
panelBox.translation_y = 0;
Main.panel.opacity = 255;
this._setPanelStructs(true);
@ -147,14 +143,18 @@ export const PanelModule = class {
}
} else if (!this._styleChangedConId) {
this._styleChangedConId = Main.panel.connect('style-changed', () => {
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');
this._updateStyle();
});
}
}
_updateStyle() {
if (opt.OVERVIEW_MODE2 || !opt.PANEL_OVERVIEW_STYLE)
Main.panel.remove_style_pseudo_class('overview');
else if (opt.PANEL_OVERVIEW_ONLY && !opt.OVERVIEW_MODE2)
Main.panel.add_style_pseudo_class('overview');
}
_updateOverviewConnection(reset = false) {
if (reset) {
if (this._hidingOverviewConId) {
@ -168,16 +168,15 @@ export const PanelModule = class {
} else {
if (!this._hidingOverviewConId) {
this._hidingOverviewConId = Main.overview.connect('hiding', () => {
if (!opt.SHOW_WS_PREVIEW_BG || opt.OVERVIEW_MODE2)
this._showPanel(false);
this._showPanel(false);
});
}
if (!this._showingOverviewConId) {
this._showingOverviewConId = Main.overview.connect('showing', () => {
if (Main.layoutManager._startingUp)
return;
if (!opt.SHOW_WS_PREVIEW_BG || opt.OVERVIEW_MODE2 || Main.layoutManager.panelBox.translation_y)
this._showPanel(true);
this._updateStyle();
this._showPanel(true);
});
}
}
@ -211,9 +210,29 @@ export const PanelModule = class {
}
_showPanel(show = true) {
const panelBox = Main.layoutManager.panelBox;
const panelHeight = Main.panel.height;
const overviewGroup = Main.layoutManager.overviewGroup;
if (panelBox.get_parent() === overviewGroup) {
if (opt.OVERVIEW_MODE2)
overviewGroup.set_child_above_sibling(panelBox, null);
else
overviewGroup.set_child_below_sibling(panelBox, Main.overview._overview);
}
if (opt.SHOW_WS_PREVIEW_BG && !opt.OVERVIEW_MODE2 && !Main.layoutManager.panelBox.translation_y)
return;
if (show) {
panelBox.translation_y = opt.PANEL_POSITION_TOP ? -panelHeight : panelHeight;
Main.panel.opacity = 255;
Main.layoutManager.panelBox.ease({
let delay = 0;
// Panel animation needs to wait until overview is visible
if (opt.DELAY_OVERVIEW_ANIMATION)
delay = global.display.get_tab_list(0, null).length * opt.DELAY_PER_WINDOW + 50;
panelBox.ease({
delay,
duration: ANIMATION_TIME,
translation_y: 0,
onComplete: () => {
@ -221,10 +240,10 @@ export const PanelModule = class {
},
});
} else if (!Main.layoutManager._startingUp) {
const panelHeight = Main.panel.height;
Main.layoutManager.panelBox.ease({
panelBox.translation_y = 0;
panelBox.ease({
duration: ANIMATION_TIME,
translation_y: opt.PANEL_POSITION_TOP ? -panelHeight + 1 : panelHeight - 1,
translation_y: opt.PANEL_POSITION_TOP ? -panelHeight : panelHeight,
onComplete: () => {
Main.panel.opacity = 0;
this._setPanelStructs(!opt.PANEL_MODE);