- In vertical mode, TExpandoMenuBar used its own width to set the width of a newly added item. Removing the last item made the MenuBar resizes

itself to (0,0), and broke further item width computation. We now use the parent view width (BarView) instead. This fixes #471 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25826 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexandre Deckner 2008-06-06 15:07:40 +00:00
parent ae4ebbcca6
commit bd8185aba2

View File

@ -488,7 +488,7 @@ TExpandoMenuBar::TeamItemAtPoint(BPoint point, BMenuItem **_item)
void
TExpandoMenuBar::AddTeam(BList *team, BBitmap *icon, char *name, char *signature)
{
float itemWidth = fVertical ? Frame().Width() : kMinimumWindowWidth;
float itemWidth = fVertical ? fBarView->Bounds().Width() : kMinimumWindowWidth;
float itemHeight = -1.0f;
desk_settings *settings = ((TBarApp *)be_app)->Settings();