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

@ -67,6 +67,7 @@ export const WorkspaceAnimationModule = class {
this._overrides.addOverride('MonitorGroup', WorkspaceAnimation.MonitorGroup.prototype, MonitorGroup);
this._connectWsAnimationSwipeTracker();
this._overrideMonitorGroupProperty();
console.debug(' WorkspaceAnimationModule - Activated');
}
@ -77,6 +78,7 @@ export const WorkspaceAnimationModule = class {
this._overrides = null;
const reset = true;
this._connectWsAnimationSwipeTracker(reset);
this._overrideMonitorGroupProperty(reset);
console.debug(' WorkspaceAnimationModule - Disabled');
}
@ -126,6 +128,30 @@ export const WorkspaceAnimationModule = class {
Main.wm._workspaceSwitcherPopup.display(wsIndex);
}
_overrideMonitorGroupProperty(reset = false) {
if (!this._origBaseDistance)
this._origBaseDistance = Object.getOwnPropertyDescriptor(WorkspaceAnimation.MonitorGroup.prototype, 'baseDistance').get;
let getter;
if (reset) {
if (this._origBaseDistance)
getter = { get: this._origBaseDistance };
} else {
getter = {
get() {
const spacing = 0; // 100 * St.ThemeContext.get_for_stage(global.stage).scale_factor;
if (global.workspace_manager.layout_rows === -1)
return this._monitor.height + spacing + (opt.PANEL_MODE ? Main.panel.height : 0); // compensation for hidden panel
else
return this._monitor.width + spacing;
},
};
}
if (getter)
Object.defineProperty(WorkspaceAnimation.MonitorGroup.prototype, 'baseDistance', getter);
}
};
const MonitorGroup = {