diff options
author | PerikiyoXD <perikiyoxd@gmail.com> | 2021-12-19 10:51:32 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-19 13:39:02 +0100 |
commit | ff49285a02729dd8590a5c6be1800c3f2d661281 (patch) | |
tree | 6b460e11e433095ba31051ea900795335da85148 | |
parent | 92710053577fdd1d54aab22b080e274db0a21dca (diff) | |
download | serenity-ff49285a02729dd8590a5c6be1800c3f2d661281.zip |
LibGUI: Adjust focus rect for Buttons with icons
Reduced focus rect inflation value for buttons with icons
to match the expected focus rect for buttons without icons.
As mentioned in 'SerenityOS Office Hours / Q&A (2021-12-17)'
-rw-r--r-- | Userland/Libraries/LibGUI/Button.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/Button.cpp b/Userland/Libraries/LibGUI/Button.cpp index 6cdeaebd89..456191fd4b 100644 --- a/Userland/Libraries/LibGUI/Button.cpp +++ b/Userland/Libraries/LibGUI/Button.cpp @@ -89,7 +89,7 @@ void Button::paint_event(PaintEvent& event) if (is_focused()) { Gfx::IntRect focus_rect; if (m_icon && !text().is_empty()) - focus_rect = text_rect.inflated(6, 6); + focus_rect = text_rect.inflated(4, 4); else focus_rect = rect().shrunken(8, 8); painter.draw_focus_rect(focus_rect, palette().focus_outline()); |