From dd72608aed378e003c46d52199f7091fe2174039 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 29 Nov 2019 15:41:53 +0100 Subject: [PATCH] LibGUI: Align GButton text according to the specified text_alignment() This makes the taskbar button labels align properly relative to their icons instead of sometimes being too far right. --- Libraries/LibGUI/GButton.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibGUI/GButton.cpp b/Libraries/LibGUI/GButton.cpp index 5ee0515d29..8d81b28024 100644 --- a/Libraries/LibGUI/GButton.cpp +++ b/Libraries/LibGUI/GButton.cpp @@ -54,7 +54,7 @@ void GButton::paint_event(GPaintEvent& event) if (text_rect.width() > content_rect.width()) text_rect.set_width(content_rect.width()); text_rect.align_within(content_rect, text_alignment()); - paint_text(painter, text_rect, font, TextAlignment::Center); + paint_text(painter, text_rect, font, text_alignment()); } void GButton::click()