workspaceThumbnails: Update target scale when fully unexpanded

We currently only update the scale when fully expanded. In order
to fix the initial expand transition, also update the scale
when fully unexpanded.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3331>
This commit is contained in:
Florian Müllner 2024-05-20 20:26:42 +02:00 committed by Marge Bot
parent 2694a64ebb
commit 6fa6dd6abb

View File

@ -1266,7 +1266,7 @@ export const ThumbnailsBox = GObject.registerClass({
// Compute the scale we'll need once everything is updated,
// unless we are currently transitioning
if (this._expandFraction === 1) {
if (this._expandFraction === 0 || this._expandFraction === 1) {
const [, natWidth] = this.get_preferred_width(-1);
const [, natHeight] = this.get_preferred_height(natWidth);
const totalSpacing = (nWorkspaces - 1) * spacing;