mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:07:45 +00:00
LibGfx+Userland: Add width_rounded_up() helper
This commit is contained in:
parent
c9404c3a63
commit
55423b4ed0
21 changed files with 34 additions and 19 deletions
|
@ -116,7 +116,7 @@ void Label::size_to_fit()
|
|||
|
||||
int Label::text_calculated_preferred_width() const
|
||||
{
|
||||
return static_cast<int>(ceilf(font().width(m_text))) + m_autosize_padding * 2;
|
||||
return font().width_rounded_up(m_text) + m_autosize_padding * 2;
|
||||
}
|
||||
|
||||
int Label::text_calculated_preferred_height() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue