mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:47:34 +00:00
LibGfx: Slim down Gfx::TextLayout API by removing unused accessors
Also store the Font as a const reference instead of a raw pointer, since we don't allow a null Font here.
This commit is contained in:
parent
65c8cd37e3
commit
6b421fb521
4 changed files with 14 additions and 23 deletions
|
@ -117,7 +117,7 @@ void Label::size_to_fit()
|
|||
|
||||
int Label::text_calculated_preferred_height() const
|
||||
{
|
||||
return int(AK::ceil(Gfx::TextLayout(&font(), Utf8View { m_text }, text_rect().to_type<float>()).bounding_rect(Gfx::TextWrapping::Wrap, Gfx::Painter::LINE_SPACING).height()));
|
||||
return int(AK::ceil(Gfx::TextLayout(font(), Utf8View { m_text }, text_rect().to_type<float>()).bounding_rect(Gfx::TextWrapping::Wrap, Gfx::Painter::LINE_SPACING).height()));
|
||||
}
|
||||
|
||||
Optional<UISize> Label::calculated_preferred_size() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue