1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:48:12 +00:00

LibGUI+LibGfx: Improve focus rect appearance

Draw a dotted focus rect to make it stand out more. Also make it much
larger on regular text-only GUI::Buttons.
This commit is contained in:
Andreas Kling 2020-10-26 20:43:59 +01:00
parent f6084d42d9
commit b7dfa83223
6 changed files with 47 additions and 2 deletions

View file

@ -70,6 +70,9 @@ void CheckBox::paint_event(PaintEvent& event)
Gfx::StylePainter::paint_check_box(painter, box_rect, palette(), is_enabled(), is_checked(), is_being_pressed());
paint_text(painter, text_rect, font(), Gfx::TextAlignment::TopLeft);
if (is_focused())
painter.draw_focus_rect(text_rect.inflated(6, 6), palette().focus_outline());
}
void CheckBox::click(unsigned)