Style fixes to TeamMenu
This commit is contained in:
parent
8f0935ac21
commit
01f35d103f
@ -50,7 +50,8 @@ All rights reserved.
|
|||||||
|
|
||||||
|
|
||||||
TTeamMenu::TTeamMenu()
|
TTeamMenu::TTeamMenu()
|
||||||
: BMenu("Team Menu")
|
:
|
||||||
|
BMenu("Team Menu")
|
||||||
{
|
{
|
||||||
SetItemMargins(0.0f, 0.0f, 0.0f, 0.0f);
|
SetItemMargins(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
SetFont(be_plain_font);
|
SetFont(be_plain_font);
|
||||||
@ -133,7 +134,7 @@ void
|
|||||||
TTeamMenu::DetachedFromWindow()
|
TTeamMenu::DetachedFromWindow()
|
||||||
{
|
{
|
||||||
TBarView* barView = (dynamic_cast<TBarApp*>(be_app))->BarView();
|
TBarView* barView = (dynamic_cast<TBarApp*>(be_app))->BarView();
|
||||||
if (barView) {
|
if (barView != NULL) {
|
||||||
BLooper* looper = barView->Looper();
|
BLooper* looper = barView->Looper();
|
||||||
if (looper->Lock()) {
|
if (looper->Lock()) {
|
||||||
barView->DragStop();
|
barView->DragStop();
|
||||||
|
@ -67,14 +67,16 @@ const float kSwitchWidth = 12;
|
|||||||
|
|
||||||
TTeamMenuItem::TTeamMenuItem(BList* team, BBitmap* icon, char* name, char* sig,
|
TTeamMenuItem::TTeamMenuItem(BList* team, BBitmap* icon, char* name, char* sig,
|
||||||
float width, float height, bool drawLabel, bool vertical)
|
float width, float height, bool drawLabel, bool vertical)
|
||||||
: BMenuItem(new TWindowMenu(team, sig))
|
:
|
||||||
|
BMenuItem(new TWindowMenu(team, sig))
|
||||||
{
|
{
|
||||||
_InitData(team, icon, name, sig, width, height, drawLabel, vertical);
|
_InitData(team, icon, name, sig, width, height, drawLabel, vertical);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TTeamMenuItem::TTeamMenuItem(float width, float height, bool vertical)
|
TTeamMenuItem::TTeamMenuItem(float width, float height, bool vertical)
|
||||||
: BMenuItem("", NULL)
|
:
|
||||||
|
BMenuItem("", NULL)
|
||||||
{
|
{
|
||||||
_InitData(NULL, NULL, strdup(""), strdup(""), width, height, false,
|
_InitData(NULL, NULL, strdup(""), strdup(""), width, height, false,
|
||||||
vertical);
|
vertical);
|
||||||
@ -156,7 +158,7 @@ TTeamMenuItem::GetContentSize(float* width, float* height)
|
|||||||
{
|
{
|
||||||
BRect iconBounds;
|
BRect iconBounds;
|
||||||
|
|
||||||
if (fIcon)
|
if (fIcon != NULL)
|
||||||
iconBounds = fIcon->Bounds();
|
iconBounds = fIcon->Bounds();
|
||||||
else
|
else
|
||||||
iconBounds = BRect(0, 0, kMinimumIconSize - 1, kMinimumIconSize - 1);
|
iconBounds = BRect(0, 0, kMinimumIconSize - 1, kMinimumIconSize - 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user