Several fixes to BMenuField layout calculations.
* The most important fix is that in BMenuField::_ValidateLayoutData(), divider was calculated, but then never used. If the menu field was not using the layout management, it should take the existing fDivider into account, but never did. This caused #2728. * Added some tracing that helped me debug this. * Fixed a bunch of layouting inconsistencies. It will also improve some unnecessary resizing of the menu bar. Will test all of this some more. But in the test app I do have, the BMenuField works more like in BeOS now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27508 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Haiku, Inc. All Rights Reserved.
|
||||
* Copyright 2006-2008, Haiku, Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
@@ -115,7 +115,7 @@ protected:
|
||||
void DrawLabel(BRect bounds, BRect update);
|
||||
static void InitMenu(BMenu* menu);
|
||||
|
||||
int32 _MenuTask();
|
||||
int32 _MenuTask();
|
||||
static int32 _thread_entry(void *arg);
|
||||
|
||||
void _UpdateFrame();
|
||||
@@ -123,6 +123,7 @@ protected:
|
||||
BRect frame, bool fixedSize);
|
||||
|
||||
void _ValidateLayoutData();
|
||||
float _MenuBarWidthDiff() const;
|
||||
|
||||
char* fLabel;
|
||||
BMenu* fMenu;
|
||||
|
||||
Reference in New Issue
Block a user