示例#1
0
文件: Data.cpp 项目: StefanL74/XCSoar
void
InfoBoxData::SetAllColors(unsigned color)
{
  SetTitleColor(color);
  SetValueColor(color);
  SetCommentColor(color);
}
示例#2
0
void ArpIntControl::DrawOn(BRect updateRect, BView* view)
{
	BRect		cb = ControlBounds();
	float		textY = cb.top + Prefs().GetInt32(ARP_FULLFONT_Y);
	if (mDivider > 0) {
		view->SetHighColor(mViewColor);
		view->FillRect( BRect(0, cb.top, cb.left, cb.bottom) );
		if (mLabel.Length() > 0) {
			if ( IsFocus() ) view->SetHighColor( Prefs().GetColor(ARP_INT_FGF_C));
			else if ( !IsEnabled() ) view->SetHighColor( tint_color(Prefs().GetColor(ARP_INT_FG_C), B_LIGHTEN_1_TINT) );
			else view->SetHighColor( Prefs().GetColor(ARP_INT_FG_C) );
			view->SetLowColor(mViewColor);
			view->DrawString( mLabel.String(), BPoint(0, textY) );
		}
	}
	DrawControlBackgroundOn(cb, view);

	BPoint			drawPt(cb.left + 3, textY);
	if (IsEnabled() == false) {
		drawPt.x++;
		drawPt.y++;
	}
	BString16		str;
	GetValueLabel(Value(), str);
	SetValueColor(view);
	view->DrawString( str.String(), drawPt );
}
示例#3
0
//======================================================================
//======================================================================
void NvUIValueText::SetColor(const NvPackedColor& color)
{
    INHERITED::SetColor(color);
    SetValueColor(color);
}