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
TTeamMenuItem::SetOverrideSelected(bool selected)
{
@@ -139,16 +125,9 @@ TTeamMenuItem::SetOverrideSelected(bool selected)
void
TTeamMenuItem::SetArrowDirection(int32 direction)
{
fArrowDirection = direction;
}
void
TTeamMenuItem::SetHasLabel(bool drawLabel)
{
fDrawLabel = drawLabel;
TTeamMenuItem::SetIcon(BBitmap* icon) {
delete fIcon;
fIcon = icon;
}
+10 -6
View File
@@ -60,15 +60,19 @@ public:
status_t Invoke(BMessage* msg = NULL);
void SetOverrideWidth(float width);
void SetOverrideHeight(float height);
void SetOverrideWidth(float width)
{ fOverrideWidth = width; };
void SetOverrideHeight(float height)
{ fOverrideHeight = height; };
void SetOverrideSelected(bool selected);
int32 ArrowDirection() const { return fArrowDirection; };
void SetArrowDirection(int32 direction);
int32 ArrowDirection() const
{ return fArrowDirection; };
void SetArrowDirection(int32 direction)
{ fArrowDirection = direction; };
bool HasLabel() const { return fDrawLabel; };
void SetHasLabel(bool drawLabel);
BBitmap* Icon() const { return fIcon; };
void SetIcon(BBitmap* icon);
bool IsExpanded() const { return fExpanded; };
void ToggleExpandState(bool resizeWindow);