Deskbar: TTeamMenuItem changes

* Add Icon() and SetIcon() methods.
* Remove HasLabel() and SetHasLabel() methods, ExpandoMenuBar now gets
  this information from the settings file directly, rather than storing
  and syncing this information with the TTeamMenuItem class.
* Move SetOverrideWidth(), SetOverrideHeight(), and
  SetArrowDirection() implementations to header.
This commit is contained in:
John Scipione
2015-02-19 19:02:38 -05:00
parent 18bcf77ab0
commit c9d2a320a3
2 changed files with 13 additions and 30 deletions
+3 -24
View File
@@ -116,20 +116,6 @@ TTeamMenuItem::Invoke(BMessage* message)
} }
void
TTeamMenuItem::SetOverrideWidth(float width)
{
fOverrideWidth = width;
}
void
TTeamMenuItem::SetOverrideHeight(float height)
{
fOverrideHeight = height;
}
void void
TTeamMenuItem::SetOverrideSelected(bool selected) TTeamMenuItem::SetOverrideSelected(bool selected)
{ {
@@ -139,16 +125,9 @@ TTeamMenuItem::SetOverrideSelected(bool selected)
void void
TTeamMenuItem::SetArrowDirection(int32 direction) TTeamMenuItem::SetIcon(BBitmap* icon) {
{ delete fIcon;
fArrowDirection = direction; fIcon = icon;
}
void
TTeamMenuItem::SetHasLabel(bool drawLabel)
{
fDrawLabel = drawLabel;
} }
+10 -6
View File
@@ -60,15 +60,19 @@ public:
status_t Invoke(BMessage* msg = NULL); status_t Invoke(BMessage* msg = NULL);
void SetOverrideWidth(float width); void SetOverrideWidth(float width)
void SetOverrideHeight(float height); { fOverrideWidth = width; };
void SetOverrideHeight(float height)
{ fOverrideHeight = height; };
void SetOverrideSelected(bool selected); void SetOverrideSelected(bool selected);
int32 ArrowDirection() const { return fArrowDirection; }; int32 ArrowDirection() const
void SetArrowDirection(int32 direction); { return fArrowDirection; };
void SetArrowDirection(int32 direction)
{ fArrowDirection = direction; };
bool HasLabel() const { return fDrawLabel; }; BBitmap* Icon() const { return fIcon; };
void SetHasLabel(bool drawLabel); void SetIcon(BBitmap* icon);
bool IsExpanded() const { return fExpanded; }; bool IsExpanded() const { return fExpanded; };
void ToggleExpandState(bool resizeWindow); void ToggleExpandState(bool resizeWindow);