Put the label truncation code back in BMenuItem.
Just a few commits ago I moved the label truncation code out of BMenuItem and into BMCMenuBar because the truncation had to happen outside of BMenuItem. Turns out, that wasn't true so I'm moving the label truncation back into BMenuItem and removing the _DrawItems() method from BMCMenuBar. Note that the code is not a copy of what was there before, but, the updated version I created for BMCMenuBar. The main difference is that I use menuPrivate.Padding() instead of GetItemMargins() and I always use the width of the parent menu frame instead of using fBounds even if the state is not MENU_STATE_CLOSED. These are changes needed for BMCMenuBar but should work just as well for a regular BMenu.
This commit is contained in:
@@ -62,8 +62,6 @@ private:
|
||||
|
||||
void _Init(bool setMaxContentWidth);
|
||||
|
||||
void _DrawItems(BRect updateRect);
|
||||
|
||||
BMenuField* fMenuField;
|
||||
bool fFixedSize;
|
||||
BMessageRunner* fRunner;
|
||||
|
||||
Reference in New Issue
Block a user