LIbGUI+LibGfx: Paint focused push buttons with a heavier look

Draw a heavy shadow frame around focused push buttons for emphasis.
For now I've used the ThreedShadow2 color role as it feels dark enough.
This commit is contained in:
Andreas Kling 2020-12-28 12:40:48 +01:00
parent 2bbf3b5d0b
commit 92c073a9d1
Notes: sideshowbarker 2024-07-19 00:30:12 +09:00
7 changed files with 19 additions and 11 deletions

View file

@ -68,7 +68,7 @@ void ControlBoxButton::paint_event(PaintEvent& event)
Painter painter(*this);
painter.add_clip_rect(event.rect());
Gfx::StylePainter::paint_button(painter, rect(), palette(), Gfx::ButtonStyle::Normal, is_being_pressed(), is_hovered(), is_checked(), is_enabled());
Gfx::StylePainter::paint_button(painter, rect(), palette(), Gfx::ButtonStyle::Normal, is_being_pressed(), is_hovered(), is_checked(), is_enabled(), is_focused());
auto button_location = rect().location().translated((width() - s_bitmap_width) / 2, (height() - s_bitmap_height) / 2);