From 3b8cb30034177fb5667554ba4b71d22a6bf7a618 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Fri, 20 Oct 2017 23:52:08 -0700 Subject: [PATCH] Deskbar: Set app menu width to drag region width ...in vertical mode. This is a simplication that is possible because I am confident that the drag region is the right size at this point so we don't have to lookup the window width or app width setting. This led to further code simplications to vertical frame sizing. Use MenuBar frame for right dimension always because it is set even if fTrayLocation were to be set to 0. --- src/apps/deskbar/BarView.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/apps/deskbar/BarView.cpp b/src/apps/deskbar/BarView.cpp index 22b0aaa7c6..3fb1b8493a 100644 --- a/src/apps/deskbar/BarView.cpp +++ b/src/apps/deskbar/BarView.cpp @@ -529,19 +529,12 @@ TBarView::PlaceApplicationBar() BRect expandoFrame(0, 0, 0, 0); if (fVertical) { // left or right - if (fTrayLocation != 0) { - expandoFrame.left = fDragRegion->Frame().left; - expandoFrame.top = fDragRegion->Frame().bottom + 1; - } else { - expandoFrame.left = fDragRegion->Frame().left; - expandoFrame.top = fBarMenuBar->Frame().bottom + 1; - } - - expandoFrame.right = expandoFrame.left + (Window() != NULL - ? Window()->Frame().Width() : fBarApp->Settings()->width); - expandoFrame.bottom = fState == kFullState - ? screenFrame.bottom - : expandoFrame.top; + expandoFrame.left = fDragRegion->Frame().left; + expandoFrame.top = fTrayLocation != 0 ? fDragRegion->Frame().bottom + 1 + : fBarMenuBar->Frame().bottom + 1; + expandoFrame.right = fBarMenuBar->Frame().right; + expandoFrame.bottom = fState == kFullState ? screenFrame.bottom + : Frame().bottom; } else { // top or bottom expandoFrame.top = 0;