Make use of the "invalid control" look flag
* Use a red border for BTextControl when the invalid flag is set.
This commit is contained in:
parent
cad9961409
commit
37456be704
@ -1660,6 +1660,7 @@ BControlLook::DrawTextControlBorder(BView* view, BRect& rect,
|
||||
rgb_color dark1BorderColor;
|
||||
rgb_color dark2BorderColor;
|
||||
rgb_color navigationColor = ui_color(B_KEYBOARD_NAVIGATION_COLOR);
|
||||
rgb_color invalidColor = ui_color(B_FAILURE_COLOR);
|
||||
|
||||
if ((flags & B_DISABLED) != 0) {
|
||||
_DrawOuterResessedFrame(view, rect, base, 0.0, 1.0, flags, borders);
|
||||
@ -1696,6 +1697,11 @@ BControlLook::DrawTextControlBorder(BView* view, BRect& rect,
|
||||
dark2BorderColor = navigationColor;
|
||||
}
|
||||
|
||||
if ((flags & B_DISABLED) == 0 && (flags & B_INVALID) != 0) {
|
||||
dark1BorderColor = invalidColor;
|
||||
dark2BorderColor = invalidColor;
|
||||
}
|
||||
|
||||
if ((flags & B_BLEND_FRAME) != 0) {
|
||||
drawing_mode oldMode = view->DrawingMode();
|
||||
view->SetDrawingMode(B_OP_ALPHA);
|
||||
|
Loading…
Reference in New Issue
Block a user