From c831635f1e42963f1a00a3a644e3cd7f43232dc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Thu, 13 Sep 2007 15:08:48 +0000 Subject: [PATCH] * 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 --- src/kits/interface/MenuField.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/kits/interface/MenuField.cpp b/src/kits/interface/MenuField.cpp index 382b2f38a1..9688920dbb 100644 --- a/src/kits/interface/MenuField.cpp +++ b/src/kits/interface/MenuField.cpp @@ -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()); + } }