* make sure that the menu bar is still aligned with the right

side if in fixed size mode in ResizeToPreferred, this fixes
  the menu bars going out of view bounds in a lot of apps using
  fixed size fields, like Screen



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22230 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2007-09-13 15:08:48 +00:00
parent bbe8558522
commit c831635f1e
1 changed files with 11 additions and 0 deletions

View File

@ -586,6 +586,17 @@ BMenuField::ResizeToPreferred()
fMenuBar->ResizeToPreferred();
BView::ResizeToPreferred();
if (fFixedSizeMB) {
// we have let the menubar resize itsself, but
// in fixed size mode, the menubar is supposed to
// be at the right end of the view always. Since
// the menu bar is in follow left/right mode then,
// resizing ourselfs might have caused the menubar
// to be outside now
fMenuBar->ResizeTo(Bounds().Width() - fDivider - 2,
fMenuBar->Frame().Height());
}
}