mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
workspace: Cap scaled floating size to target layout size
A window preview's floating geometry is scaled down according to the workspace's allocation, while the layout geometry is computed directly for the available space. For previews that maintain their real size in the layout geometry, that scaling leads to a distracting size bounce when transitioning between both layouts. Address that by not allowing the scaled floating size to drop below that layout size (which is at most equal to the unscaled floating size). https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2968
This commit is contained in:
parent
497f10178c
commit
7f402c1c6b
1 changed files with 5 additions and 0 deletions
|
|
@ -614,6 +614,11 @@ var WorkspaceLayout = GObject.registerClass({
|
|||
}
|
||||
|
||||
workspaceBox.scale(allocationScale);
|
||||
// don't allow the scaled floating size to drop below
|
||||
// the target layout size
|
||||
workspaceBox.set_size(
|
||||
Math.max(workspaceBox.get_width(), width),
|
||||
Math.max(workspaceBox.get_height(), height));
|
||||
|
||||
layoutBox.x1 = x;
|
||||
layoutBox.x2 = layoutBox.x1 + width;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue