mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 01:08:48 +00:00
LibGUI: Fix bogus focus rect in buttons with icon but no text
This commit is contained in:
parent
06b5d292d7
commit
d172783d33
Notes:
sideshowbarker
2024-07-19 01:41:53 +09:00
Author: https://github.com/awesomekling
Commit: d172783d33
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue