Now uses B_CONTROL_TEXT_COLOR to draw the label instead of just black.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16404 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -175,12 +175,12 @@ BTextControl::SetAlignment(alignment labelAlignment, alignment textAlignment)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BTextControl::GetAlignment(alignment *label, alignment *text) const
|
BTextControl::GetAlignment(alignment* _label, alignment* _text) const
|
||||||
{
|
{
|
||||||
if (label)
|
if (_label)
|
||||||
*label = fLabelAlign;
|
*_label = fLabelAlign;
|
||||||
if (text)
|
if (_text)
|
||||||
*text = fText->Alignment();
|
*_text = fText->Alignment();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -213,15 +213,14 @@ BTextControl::Divider() const
|
|||||||
void
|
void
|
||||||
BTextControl::Draw(BRect updateRect)
|
BTextControl::Draw(BRect updateRect)
|
||||||
{
|
{
|
||||||
rgb_color noTint = ui_color(B_PANEL_BACKGROUND_COLOR),
|
rgb_color noTint = ui_color(B_PANEL_BACKGROUND_COLOR);
|
||||||
lighten1 = tint_color(noTint, B_LIGHTEN_1_TINT),
|
rgb_color lighten1 = tint_color(noTint, B_LIGHTEN_1_TINT);
|
||||||
lighten2 = tint_color(noTint, B_LIGHTEN_2_TINT),
|
rgb_color lighten2 = tint_color(noTint, B_LIGHTEN_2_TINT);
|
||||||
lightenMax = tint_color(noTint, B_LIGHTEN_MAX_TINT),
|
rgb_color lightenMax = tint_color(noTint, B_LIGHTEN_MAX_TINT);
|
||||||
darken1 = tint_color(noTint, B_DARKEN_1_TINT),
|
rgb_color darken1 = tint_color(noTint, B_DARKEN_1_TINT);
|
||||||
darken2 = tint_color(noTint, B_DARKEN_2_TINT),
|
rgb_color darken2 = tint_color(noTint, B_DARKEN_2_TINT);
|
||||||
darken4 = tint_color(noTint, B_DARKEN_4_TINT),
|
rgb_color darken4 = tint_color(noTint, B_DARKEN_4_TINT);
|
||||||
darkenMax = tint_color(noTint, B_DARKEN_MAX_TINT),
|
rgb_color navigationColor = ui_color(B_KEYBOARD_NAVIGATION_COLOR);
|
||||||
navigationColor = ui_color(B_KEYBOARD_NAVIGATION_COLOR);
|
|
||||||
|
|
||||||
bool enabled = IsEnabled();
|
bool enabled = IsEnabled();
|
||||||
bool active = false;
|
bool active = false;
|
||||||
@@ -302,7 +301,7 @@ BTextControl::Draw(BRect updateRect)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetHighColor(IsEnabled() ? darkenMax
|
SetHighColor(IsEnabled() ? ui_color(B_CONTROL_TEXT_COLOR)
|
||||||
: tint_color(ui_color(B_PANEL_BACKGROUND_COLOR), B_DISABLED_LABEL_TINT));
|
: tint_color(ui_color(B_PANEL_BACKGROUND_COLOR), B_DISABLED_LABEL_TINT));
|
||||||
DrawString(Label(), BPoint(x, y));
|
DrawString(Label(), BPoint(x, y));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user