Style fixes to ExpandoMenuBar

This commit is contained in:
John Scipione
2013-05-28 18:07:23 -04:00
parent 83fd8a6199
commit d0f798c8d2
2 changed files with 12 additions and 11 deletions
+5 -6
View File
@@ -396,6 +396,7 @@ TExpandoMenuBar::MouseMoved(BPoint where, uint32 code, const BMessage* message)
SetToolTip(windowMenuItem->FullTitle()); SetToolTip(windowMenuItem->FullTitle());
} else } else
SetToolTip((const char*)NULL); SetToolTip((const char*)NULL);
break; break;
} }
@@ -406,12 +407,10 @@ TExpandoMenuBar::MouseMoved(BPoint where, uint32 code, const BMessage* message)
break; break;
} }
// new item, set the tooltip to the item name
SetToolTip(item->Name()); SetToolTip(item->Name());
// new item, set the tooltip to the item name
// save the current menuitem for the next MouseMoved() call
fLastMousedOverItem = menuItem; fLastMousedOverItem = menuItem;
// save the current menuitem for the next MouseMoved() call
break; break;
} }
@@ -422,8 +421,8 @@ TExpandoMenuBar::MouseMoved(BPoint where, uint32 code, const BMessage* message)
{ {
TTeamMenuItem* lastItem TTeamMenuItem* lastItem
= dynamic_cast<TTeamMenuItem*>(fLastClickedItem); = dynamic_cast<TTeamMenuItem*>(fLastClickedItem);
if (fVertical && fShowTeamExpander && fClickedExpander if (lastItem != NULL && fVertical && fShowTeamExpander
&& lastItem != NULL) { && fClickedExpander) {
// Started expander animation, then exited view, // Started expander animation, then exited view,
// since we can't track outside mouse movements // since we can't track outside mouse movements
// redraw the original expander arrow // redraw the original expander arrow
+7 -5
View File
@@ -45,11 +45,6 @@ All rights reserved.
#include <Locker.h> #include <Locker.h>
class BBitmap;
class TBarView;
class TBarMenuTitle;
class TTeamMenuItem;
//#define DOUBLECLICKBRINGSTOFRONT //#define DOUBLECLICKBRINGSTOFRONT
enum drag_and_drop_selection { enum drag_and_drop_selection {
@@ -59,6 +54,13 @@ enum drag_and_drop_selection {
kAnyMenuSelection kAnyMenuSelection
}; };
class BBitmap;
class TBarView;
class TBarMenuTitle;
class TTeamMenuItem;
class TExpandoMenuBar : public BMenuBar { class TExpandoMenuBar : public BMenuBar {
public: public:
TExpandoMenuBar(BRect frame, const char* name, TExpandoMenuBar(BRect frame, const char* name,