From 9bf550da881f9f3d38787cecdcaeae8f471d8a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Sun, 12 May 2024 11:51:35 +0200 Subject: [PATCH] overviewControls: Set expandFraction for ws thumbnails to 0 when hidden We multiply the spacing around the workspace thumbnails with the expandFraction so that it grows with the animation to show/hide them. We shouldn't factor in the extra spacing to accomodate for the thumbnails in case they're hidden though, so make sure expandFraction is set to 0 after the thumbnails got hidden. This fixes the spacing when a user never uses workspaces (and the workspace thumbnails are never shown), and also the first transition from hidden->shown for the thumbnails, which currently starts at 100% scale (ie. pops into existence). Part-of: --- js/ui/overviewControls.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index 0fc81d85c..21084b110 100644 --- a/js/ui/overviewControls.js +++ b/js/ui/overviewControls.js @@ -561,7 +561,10 @@ class ControlsManager extends St.Widget { opacity: searchActive ? 0 : opacity, duration: animate ? SIDE_CONTROLS_ANIMATION_TIME : 0, mode: Clutter.AnimationMode.EASE_OUT_QUAD, - onComplete: () => (this._thumbnailsBox.visible = thumbnailsBoxVisible), + onComplete: () => { + this._thumbnailsBox.visible = thumbnailsBoxVisible; + this._thumbnailsBox.expandFraction = 0; + }, }; if (!searchActive) {