diff options
author | Andreas Kling <kling@serenityos.org> | 2020-10-26 21:08:01 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-10-26 21:08:01 +0100 |
commit | d172783d339db6b3ba128c0a65286d82bf1ebcaa (patch) | |
tree | 35cc7c379e479c47ec50744e348147ae8b9744ec /Libraries/LibGUI/Button.cpp | |
parent | 06b5d292d754b172567fa561668a3bfbbe120a2c (diff) | |
download | serenity-d172783d339db6b3ba128c0a65286d82bf1ebcaa.zip |
LibGUI: Fix bogus focus rect in buttons with icon but no text
Diffstat (limited to 'Libraries/LibGUI/Button.cpp')
-rw-r--r-- | Libraries/LibGUI/Button.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibGUI/Button.cpp b/Libraries/LibGUI/Button.cpp index f8a4aba224..93539907b5 100644 --- a/Libraries/LibGUI/Button.cpp +++ b/Libraries/LibGUI/Button.cpp @@ -95,7 +95,7 @@ void Button::paint_event(PaintEvent& event) if (is_focused()) { Gfx::IntRect focus_rect; - if (m_icon) + if (m_icon && !text().is_empty()) focus_rect = text_rect.inflated(6, 6); else focus_rect = rect().shrunken(8, 8); |