From ff49285a02729dd8590a5c6be1800c3f2d661281 Mon Sep 17 00:00:00 2001 From: PerikiyoXD Date: Sun, 19 Dec 2021 10:51:32 +0100 Subject: [PATCH] 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)' --- Userland/Libraries/LibGUI/Button.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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());