Improve Workspaces Zoom() implementation
* Do not move the window, this is annoying * Instead of putting the window at a fixed size, keep the current width and adjust the height so the preview has a correct aspect ratio. Fixes #5034.
This commit is contained in:
parent
c4e8d88f7c
commit
8f4cd9c976
@ -731,7 +731,7 @@ WorkspacesWindow::Zoom(BPoint origin, float width, float height)
|
||||
uint32 columns, rows;
|
||||
BPrivate::get_workspaces_layout(&columns, &rows);
|
||||
|
||||
float workspaceWidth = screenWidth / 10;
|
||||
float workspaceWidth = Frame().Width() / columns;
|
||||
float workspaceHeight = workspaceWidth / aspectRatio;
|
||||
|
||||
width = floor(workspaceWidth * columns);
|
||||
@ -746,12 +746,6 @@ WorkspacesWindow::Zoom(BPoint origin, float width, float height)
|
||||
}
|
||||
|
||||
ResizeTo(width, height);
|
||||
|
||||
origin = screen.Frame().RightBottom();
|
||||
origin.x -= kScreenBorderOffset + width;
|
||||
origin.y -= kScreenBorderOffset + height;
|
||||
|
||||
MoveTo(origin);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user