mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
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)'
This commit is contained in:
parent
9271005357
commit
ff49285a02
1 changed files with 1 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue