LibGfx+LibGUI: Allow theming the focus outline of AbstractButton

This commit is contained in:
Tibor Nagy 2020-02-20 13:36:58 +01:00 committed by Andreas Kling
parent e490fc9e35
commit 6e2a16c8a8
Notes: sideshowbarker 2024-07-19 09:11:55 +09:00
9 changed files with 9 additions and 1 deletions

View file

@ -186,7 +186,7 @@ void AbstractButton::paint_text(Painter& painter, const Gfx::Rect& rect, const G
return;
painter.draw_text(clipped_rect, text(), font, text_alignment, palette().button_text(), Gfx::TextElision::Right);
if (is_focused())
painter.draw_rect(clipped_rect.inflated(6, 4), Color(140, 140, 140));
painter.draw_rect(clipped_rect.inflated(6, 4), palette().focus_outline());
}
void AbstractButton::change_event(Event& event)