diff --git a/src/apps/deskbar/ExpandoMenuBar.cpp b/src/apps/deskbar/ExpandoMenuBar.cpp
index 0fd4483..1622b67 100644
a
|
b
|
Except as contained in this notice, the name of Be Incorporated shall not be
|
26 | 26 | used in advertising or otherwise to promote the sale, use or other dealings in |
27 | 27 | this Software without prior written authorization from Be Incorporated. |
28 | 28 | |
29 | | Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks |
30 | | of Be Incorporated in the United States and other countries. Other brand product |
31 | | names are registered trademarks or trademarks of their respective holders. |
| 29 | Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered |
| 30 | trademarks of Be Incorporated in the United States and other countries. Other |
| 31 | brand product names are registered trademarks or trademarks of their respective |
| 32 | holders. |
32 | 33 | All rights reserved. |
33 | 34 | */ |
34 | 35 | |
… |
… |
TExpandoMenuBar::AttachedToWindow()
|
118 | 119 | R_BeLogoIcon); |
119 | 120 | if (logoBitmap != NULL) |
120 | 121 | fBeMenuWidth = logoBitmap->Bounds().Width() + 16; |
121 | | fBeMenuItem = new TBarMenuTitle(fBeMenuWidth, Frame().Height(), |
122 | | logoBitmap, beMenu, true); |
| 122 | fBeMenuItem = new TBarMenuTitle(fBeMenuWidth, Frame().Height(), |
| 123 | logoBitmap, beMenu, true); |
123 | 124 | AddItem(fBeMenuItem); |
124 | 125 | |
125 | 126 | fSeparatorItem = new TTeamMenuItem(kSepItemWidth, height, fVertical); |
… |
… |
TExpandoMenuBar::RemoveTeam(team_id team, bool partial)
|
584 | 585 | RemoveItem(i); |
585 | 586 | |
586 | 587 | if (fVertical) { |
587 | | // instead of resizing the window here and there in the |
588 | | // code the resize method will be centered in one place |
589 | | // thus, the same behavior (good or bad) will be used |
590 | | // whereever window sizing is done |
| 588 | // instead of resizing the window here and there in the |
| 589 | // code the resize method will be centered in one place |
| 590 | // thus, the same behavior (good or bad) will be used |
| 591 | // whereever window sizing is done |
591 | 592 | fBarView->SizeWindow(BScreen(Window()).Frame()); |
592 | 593 | } else |
593 | 594 | CheckItemSizes(-1); |
… |
… |
TExpandoMenuBar::CheckItemSizes(int32 delta)
|
613 | 614 | |
614 | 615 | if (!fBarView->Vertical()) { |
615 | 616 | // in this case there are 2 extra items: |
616 | | // The Be Menu |
617 | | // The little separator item |
| 617 | // - The Be Menu |
| 618 | // - The little separator item |
618 | 619 | fullWidth = fullWidth - (sMinimumWindowWidth * 2) |
619 | 620 | + (fBeMenuWidth + kSepItemWidth); |
620 | 621 | width -= (fBeMenuWidth + kSepItemWidth); |
… |
… |
TExpandoMenuBar::CheckItemSizes(int32 delta)
|
624 | 625 | if (delta >= 0 && fullWidth > width) { |
625 | 626 | fOverflow = true; |
626 | 627 | reset = true; |
627 | | newWidth = floorf(width/count); |
| 628 | newWidth = floorf(width / count); |
628 | 629 | } else if (delta < 0 && fOverflow) { |
629 | 630 | reset = true; |
630 | 631 | if (fullWidth > width) |
631 | | newWidth = floorf(width/count); |
| 632 | newWidth = floorf(width / count); |
632 | 633 | else |
633 | 634 | newWidth = sMinimumWindowWidth; |
634 | 635 | } |
… |
… |
void
|
713 | 714 | TExpandoMenuBar::CheckForSizeOverrun() |
714 | 715 | { |
715 | 716 | BRect screenFrame = (BScreen(Window())).Frame(); |
716 | | if (fVertical) |
717 | | fIsScrolling = Window()->Frame().bottom > screenFrame.bottom; |
718 | | else |
719 | | fIsScrolling = false; |
| 717 | |
| 718 | fIsScrolling = fVertical ? Window()->Frame().bottom > screenFrame.bottom |
| 719 | : false; |
720 | 720 | } |
721 | 721 | |
722 | 722 | |
… |
… |
TExpandoMenuBar::monitor_team_windows(void* arg)
|
744 | 744 | // Set all WindowMenuItems to require an update. |
745 | 745 | TWindowMenuItem* item = NULL; |
746 | 746 | for (int32 i = 0; i < totalItems; i++) { |
747 | | if (!teamMenu->SubmenuAt(i)){ |
| 747 | if (!teamMenu->SubmenuAt(i)) { |
748 | 748 | item = static_cast<TWindowMenuItem*>(teamMenu->ItemAt(i)); |
749 | 749 | item->SetRequireUpdate(); |
750 | 750 | } |
… |
… |
TExpandoMenuBar::monitor_team_windows(void* arg)
|
814 | 814 | |
815 | 815 | // Remove any remaining items which require an update. |
816 | 816 | for (int32 i = 0; i < totalItems; i++) { |
817 | | if (!teamMenu->SubmenuAt(i)){ |
| 817 | if (!teamMenu->SubmenuAt(i)) { |
818 | 818 | item = static_cast<TWindowMenuItem*>(teamMenu->ItemAt(i)); |
819 | 819 | if (item && item->RequiresUpdate()) { |
820 | 820 | item = static_cast<TWindowMenuItem*> |