mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
LibGUI: Fix bogus focus rect in buttons with icon but no text
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user