From 712c1e8c396de7f5f390d475f92eba45e9f287ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 22 May 2006 16:54:32 +0000 Subject: [PATCH] Fixed the BMenuBar not spanning over the whole window width for MediaPlayer and VLC (what a coincidence :)). Would be nice if there is a better solution, though... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17539 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Menu.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/kits/interface/Menu.cpp b/src/kits/interface/Menu.cpp index 831f0c36e5..fe06b8118e 100644 --- a/src/kits/interface/Menu.cpp +++ b/src/kits/interface/Menu.cpp @@ -1540,7 +1540,13 @@ BMenu::ComputeLayout(int32 index, bool bestFit, bool moveItems, } if (_width) { - if ((ResizingMode() & B_FOLLOW_LEFT_RIGHT) == B_FOLLOW_LEFT_RIGHT) { + // change width depending on resize mode - BMenuBars always span + // over the whole width of its parent + // TODO: this is certainly ugly, and it would be nice if there + // would be a cleaner solution to this problem + if ((ResizingMode() & B_FOLLOW_LEFT_RIGHT) == B_FOLLOW_LEFT_RIGHT + || (dynamic_cast(this) != NULL + && dynamic_cast<_BMCMenuBar_*>(this) == NULL)) { if (Parent()) *_width = Parent()->Frame().Width() + 1; else if (Window())