From 508007f1dd11de4f154788e1c85940f086390b70 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 24 May 2019 17:41:22 +0200 Subject: [PATCH] GRadioButton: Draw a focus rect when focused. --- LibGUI/GRadioButton.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/LibGUI/GRadioButton.cpp b/LibGUI/GRadioButton.cpp index 40dd00cada0..e53684e200d 100644 --- a/LibGUI/GRadioButton.cpp +++ b/LibGUI/GRadioButton.cpp @@ -49,6 +49,9 @@ void GRadioButton::paint_event(GPaintEvent& event) Rect text_rect { circle_rect.right() + 4, 0, font().width(text()), font().glyph_height() }; text_rect.center_vertically_within(rect()); painter.draw_text(text_rect, text(), TextAlignment::CenterLeft, foreground_color()); + + if (is_focused()) + painter.draw_rect(text_rect.inflated(6, 4), Color(140, 140, 140)); } }