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
This commit is contained in:
@@ -1540,7 +1540,13 @@ BMenu::ComputeLayout(int32 index, bool bestFit, bool moveItems,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_width) {
|
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<BMenuBar*>(this) != NULL
|
||||||
|
&& dynamic_cast<_BMCMenuBar_*>(this) == NULL)) {
|
||||||
if (Parent())
|
if (Parent())
|
||||||
*_width = Parent()->Frame().Width() + 1;
|
*_width = Parent()->Frame().Width() + 1;
|
||||||
else if (Window())
|
else if (Window())
|
||||||
|
|||||||
Reference in New Issue
Block a user