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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user