Deskbar: Limit app bar width by BarMenuBar width
... in horizontal mode instead of (mis)calculating it. Fixes #18299 Change-Id: I33bddd5f985677f7730f0025291fdfae90f4cb76 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6214 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Tested-by: Automation <automation@haiku-os.org> Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
fb222ad5f7
commit
7ee7b33be6
@ -617,10 +617,8 @@ TBarView::PlaceApplicationBar()
|
||||
// top or bottom
|
||||
expandoFrame.top = 0;
|
||||
expandoFrame.bottom = TeamMenuItemHeight();
|
||||
expandoFrame.left = gMinimumWindowWidth / 2 + be_control_look->ComposeSpacing(kIconPadding);
|
||||
expandoFrame.right = screenFrame.Width();
|
||||
if (fTrayLocation != 0 && fDragRegion != NULL)
|
||||
expandoFrame.right -= fDragRegion->Frame().Width() + 1;
|
||||
expandoFrame.left = screenFrame.left + fBarMenuBar->Frame().Width();
|
||||
expandoFrame.right = screenFrame.right - fDragRegion->Frame().Width() - 1;
|
||||
}
|
||||
|
||||
fInlineScrollView->DetachScrollers();
|
||||
|
@ -56,7 +56,7 @@ All rights reserved.
|
||||
#include "icons.h"
|
||||
|
||||
#include "BarApp.h"
|
||||
#include "BarMenuTitle.h"
|
||||
#include "BarMenuBar.h"
|
||||
#include "BarView.h"
|
||||
#include "BarWindow.h"
|
||||
#include "DeskbarMenu.h"
|
||||
@ -71,8 +71,6 @@ All rights reserved.
|
||||
#include "WindowMenuItem.h"
|
||||
|
||||
|
||||
const float kDeskbarMenuWidth = gMinimumWindowWidth / 2;
|
||||
|
||||
const uint32 kMinimizeTeam = 'mntm';
|
||||
const uint32 kBringTeamToFront = 'bftm';
|
||||
|
||||
@ -943,8 +941,9 @@ TExpandoMenuBar::CheckForSizeOverrunHorizontal()
|
||||
float
|
||||
TExpandoMenuBar::MaxHorizontalWidth()
|
||||
{
|
||||
return (fBarView->DragRegion()->Frame().left - 1) -
|
||||
(kDeskbarMenuWidth + be_control_look->ComposeSpacing(kIconPadding));
|
||||
return (BScreen(Window())).Frame().Width()
|
||||
- fBarView->DragRegion()->Frame().Width() - 1
|
||||
- fBarView->BarMenuBar()->Frame().Width();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user