mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 11:09:18 +00:00
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.
This commit is contained in:
parent
f75a6b9daa
commit
dd72608aed
Notes:
sideshowbarker
2024-07-19 11:02:05 +09:00
Author: https://github.com/awesomekling
Commit: dd72608aed
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ void GButton::paint_event(GPaintEvent& event)
|
||||||
if (text_rect.width() > content_rect.width())
|
if (text_rect.width() > content_rect.width())
|
||||||
text_rect.set_width(content_rect.width());
|
text_rect.set_width(content_rect.width());
|
||||||
text_rect.align_within(content_rect, text_alignment());
|
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()
|
void GButton::click()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue