From bd8185aba22e85d8a5e67cbbd6846908ea4110d2 Mon Sep 17 00:00:00 2001 From: Alexandre Deckner Date: Fri, 6 Jun 2008 15:07:40 +0000 Subject: [PATCH] - 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 --- src/apps/deskbar/ExpandoMenuBar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/deskbar/ExpandoMenuBar.cpp b/src/apps/deskbar/ExpandoMenuBar.cpp index 111309b3f1..13062c7c1e 100644 --- a/src/apps/deskbar/ExpandoMenuBar.cpp +++ b/src/apps/deskbar/ExpandoMenuBar.cpp @@ -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();