RensAlthuis / vertical-overview

Gnome has had vertically stacked workspaces for a long time. The Gnome 40 update unfortunately made the switch to a horizontal layout. A choice that many Gnome users disagree with. This extension completely replaces the new Gnome overview with something that resembles the old style.
GNU General Public License v3.0
311 stars 30 forks source link

Obscured desktop previews #109

Closed mordae closed 2 years ago

mordae commented 2 years ago

Hi, I am on Fedora 36 with 4K screen at 200% scaling and for some reason the desktop previews are now obscured by the current desktop. Like that:

obscured-desktop-previews

Please advise.

mordae commented 2 years ago

Worked around it:

--- a/overviewControls.js   2022-06-18 09:34:05.623385675 +0200
+++ b/overviewControls.js   2022-06-18 09:34:33.592686889 +0200
@@ -68,7 +68,7 @@
         duration: Overview.ANIMATION_TIME,
     });

-    const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
+    const scaleFactor = 1;
     const rightOffset = controlsManager.layoutManager.rightOffset * scaleFactor;

     controlsManager._thumbnailsBox.translation_x = rightOffset;
@@ -180,7 +180,7 @@
     vfunc_allocate: function(container, box) {
         const childBox = new Clutter.ActorBox();

-        const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
+        const scaleFactor = 1;
         var leftOffset = this.leftOffset * scaleFactor;
         let rightOffset = this.rightOffset * scaleFactor;

Both dash and workspace previews now scale with left/right offset extension settings and nothing overflows.

mordae commented 2 years ago

The issue was introduced by f8d3431320aef5efee06189e90a86ca2fb370aca by @jackpot51.

Scaling workspace previews is not enough, one would need to scale the content down to fit. Perhaps multiplying left/right offset from the extension settings by the scaling factor instead would do the trick?