From ddb8a390057f08a6abb0de505c799a1089410a59 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Tue, 18 Feb 2020 19:45:29 -0500 Subject: [PATCH] BWindow: Adjust default zoom for new mini-mode Treat bottom left, bottom right, and top left mini-mode like horizontal mode and go full screen in top right mini-mode. Change-Id: I55c4c0875b5696e6c193a72d96f309c3b058bf9c Reviewed-on: https://review.haiku-os.org/c/haiku/+/2254 Reviewed-by: Adrien Destugues --- src/kits/interface/Window.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index 3f27e5ea55..4af569f81b 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -1569,20 +1569,24 @@ BWindow::Zoom() break; case B_DESKBAR_BOTTOM: + case B_DESKBAR_LEFT_BOTTOM: + case B_DESKBAR_RIGHT_BOTTOM: zoomArea.bottom = deskbarFrame.top - 2; break; - // in vertical mode, only if not always on top and not auto-raise + // in vertical expando mode only if not always-on-top or auto-raise case B_DESKBAR_LEFT_TOP: - case B_DESKBAR_LEFT_BOTTOM: - if (!deskbar.IsAlwaysOnTop() && !deskbar.IsAutoRaise()) + if (!deskbar.IsExpanded()) + zoomArea.top = deskbarFrame.bottom + 2; + else if (!deskbar.IsAlwaysOnTop() && !deskbar.IsAutoRaise()) zoomArea.left = deskbarFrame.right + 2; break; default: case B_DESKBAR_RIGHT_TOP: - case B_DESKBAR_RIGHT_BOTTOM: - if (!deskbar.IsAlwaysOnTop() && !deskbar.IsAutoRaise()) + if (!deskbar.IsExpanded()) + break; + else if (!deskbar.IsAlwaysOnTop() && !deskbar.IsAutoRaise()) zoomArea.right = deskbarFrame.left - 2; break; }