1
Fork 0
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:
Andreas Kling 2018-10-13 20:59:25 +02:00
parent 1929cb6b71
commit 6f1b384cde
6 changed files with 39 additions and 9 deletions

View file

@ -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));
}