Workspaces: style fixes

As pointed out by Axel.
This commit is contained in:
Adrien Destugues 2016-09-25 11:20:32 +02:00
parent 43caca9680
commit 29089fe2e8

View File

@ -694,7 +694,8 @@ WorkspacesWindow::WorkspacesWindow(WorkspacesSettings *settings)
float width = floor(workspaceWidth * columns); float width = floor(workspaceWidth * columns);
float height = floor(workspaceHeight * rows); float height = floor(workspaceHeight * rows);
// If you have too many workspaces to fit on the screen, shrink until they fit. // If you have too many workspaces to fit on the screen, shrink until
// they fit.
while (width + 2 * borderWidth > screenWidth while (width + 2 * borderWidth > screenWidth
|| height + 2 * borderWidth + GetTabHeight() > screenHeight) { || height + 2 * borderWidth + GetTabHeight() > screenHeight) {
width = floor(0.95 * width); width = floor(0.95 * width);
@ -796,15 +797,15 @@ WorkspacesWindow::Zoom(BPoint origin, float width, float height)
height = floor(workspaceHeight * rows); height = floor(workspaceHeight * rows);
while (width + 2 * GetScreenBorderOffset() > screenWidth while (width + 2 * GetScreenBorderOffset() > screenWidth
|| height + 2 * GetScreenBorderOffset() + GetTabHeight() > screenHeight) { || height + 2 * GetScreenBorderOffset() + GetTabHeight()
> screenHeight) {
width = floor(0.95 * width); width = floor(0.95 * width);
height = floor(0.95 * height); height = floor(0.95 * height);
} }
ResizeTo(width, height); ResizeTo(width, height);
if (fSettings->AutoRaising()) if (fSettings->AutoRaising()) {
{
// The auto-raising mode makes sense only if the window is positionned // The auto-raising mode makes sense only if the window is positionned
// exactly in the bottom-right corner. If the setting is enabled, move // exactly in the bottom-right corner. If the setting is enabled, move
// the window there. // the window there.