mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:57:35 +00:00
More work on focus.
ListBox now renders differently depending on focus state.
This commit is contained in:
parent
1929cb6b71
commit
6f1b384cde
6 changed files with 39 additions and 9 deletions
|
@ -201,3 +201,12 @@ void Painter::drawLine(const Point& p1, const Point& p2, Color color)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Painter::drawFocusRect(const Rect& rect)
|
||||
{
|
||||
Rect focusRect = rect;
|
||||
focusRect.moveBy(1, 1);
|
||||
focusRect.setWidth(focusRect.width() - 2);
|
||||
focusRect.setHeight(focusRect.height() - 2);
|
||||
drawRect(focusRect, Color(96, 96, 192));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue