workspaceThumbnail: Expose maxThumbnailScale as property

Some extensions want to modify the value of the MAX_THUMBNAIL_SCALE
constant. That is no longer possible, as exports are always read-only
from the outside.

Make this possible again by exposing the scale as a property on the
object itself, so extensions can override it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2939>
This commit is contained in:
Florian Müllner
2023-08-12 00:32:35 +02:00
committed by Marge Bot
parent 08eaf83141
commit d8014090fd
3 changed files with 12 additions and 7 deletions

View File

@ -195,7 +195,7 @@ class ControlsManagerLayout extends Clutter.BoxLayout {
this._workspacesThumbnails.get_preferred_height(width);
thumbnailsHeight = Math.min(
thumbnailsHeight * expandFraction,
height * WorkspaceThumbnail.MAX_THUMBNAIL_SCALE);
height * this._workspacesThumbnails.maxThumbnailScale);
childBox.set_origin(0, startY + searchHeight + spacing);
childBox.set_size(width, thumbnailsHeight);
this._workspacesThumbnails.allocate(childBox);