diff --git a/src/apps/deskbar/BarView.cpp b/src/apps/deskbar/BarView.cpp index a52a21cdd1..2e88320efa 100644 --- a/src/apps/deskbar/BarView.cpp +++ b/src/apps/deskbar/BarView.cpp @@ -516,6 +516,8 @@ TBarView::PlaceApplicationBar() SizeWindow(screenFrame); PositionWindow(screenFrame); + CheckForScrolling(); + Window()->UpdateIfNeeded(); Invalidate(); } @@ -578,8 +580,6 @@ TBarView::SizeWindow(BRect screenFrame) float windowWidth, windowHeight; GetPreferredWindowSize(screenFrame, &windowWidth, &windowHeight); Window()->ResizeTo(windowWidth, windowHeight); - - CheckForScrolling(); } @@ -609,7 +609,7 @@ TBarView::PositionWindow(BRect screenFrame) void TBarView::CheckForScrolling() { - if (fExpando != NULL) { + if (fInlineScrollView != NULL && fExpando != NULL) { if (fExpando->CheckForSizeOverrun()) fInlineScrollView->AttachScrollers(); else @@ -719,8 +719,6 @@ TBarView::ExpandItems() // Clean up the expanded items list RemoveExpandedItems(); - - fExpando->SizeWindow(1); } diff --git a/src/apps/deskbar/ExpandoMenuBar.cpp b/src/apps/deskbar/ExpandoMenuBar.cpp index f2cbca65b9..d44fc069da 100644 --- a/src/apps/deskbar/ExpandoMenuBar.cpp +++ b/src/apps/deskbar/ExpandoMenuBar.cpp @@ -808,6 +808,7 @@ TExpandoMenuBar::CheckForSizeOverrun() + kSepItemWidth; float maxWidth = fBarView->DragRegion()->Frame().left - fDeskbarMenuWidth - kSepItemWidth; + return menuWidth > maxWidth; } @@ -819,9 +820,12 @@ TExpandoMenuBar::SizeWindow(int32 delta) // code the resize method will be centered in one place // thus, the same behavior (good or bad) will be used // wherever window sizing is done - if (fVertical) - fBarView->SizeWindow(BScreen(Window()).Frame()); - else + if (fVertical) { + BRect screenFrame = (BScreen(Window())).Frame(); + fBarView->SizeWindow(screenFrame); + fBarView->PositionWindow(screenFrame); + fBarView->CheckForScrolling(); + } else CheckItemSizes(delta); }