diff options
author | Andreas Kling <kling@serenityos.org> | 2023-03-03 18:56:10 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-03-04 00:29:38 +0100 |
commit | 6c8e9fa1b357e6167ec9b902f6b30e042043d597 (patch) | |
tree | a85ebcbd7b0d5f07abb7348b3f25ffaaee8c25d6 /Userland | |
parent | 7b635998a84bdad5f1f30ad01e85e8a01b2c2b79 (diff) | |
download | serenity-6c8e9fa1b357e6167ec9b902f6b30e042043d597.zip |
LibGUI: Paint the GroupBox title with left alignment
This fixes an issue where the title would shift around at the subpixel
level when appended to. (Only matters for vector fonts.)
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibGUI/GroupBox.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGUI/GroupBox.cpp b/Userland/Libraries/LibGUI/GroupBox.cpp index 9bc681d2ad..6b4b2d1d73 100644 --- a/Userland/Libraries/LibGUI/GroupBox.cpp +++ b/Userland/Libraries/LibGUI/GroupBox.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2018-2023, Andreas Kling <kling@serenityos.org> * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause @@ -45,7 +45,7 @@ void GroupBox::paint_event(PaintEvent& event) if (!m_title.is_empty()) { Gfx::IntRect text_rect { 6, 1, static_cast<int>(ceilf(font().width(m_title) + 6)), font().glyph_height() }; painter.fill_rect(text_rect, palette().button()); - painter.draw_text(text_rect, m_title, Gfx::TextAlignment::Center, palette().button_text()); + painter.draw_text(text_rect, m_title, Gfx::TextAlignment::CenterLeft, palette().button_text()); } } |