mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibGfx+LibGUI: Use constant for line spacing instead of magic number
This commit is contained in:
parent
67de1a8148
commit
2b7aa4a971
Notes:
sideshowbarker
2024-07-17 07:43:05 +09:00
Author: https://github.com/lanmonster
Commit: 2b7aa4a971
Pull-request: https://github.com/SerenityOS/serenity/pull/16237
Reviewed-by: https://github.com/linusg
3 changed files with 6 additions and 7 deletions
|
@ -117,9 +117,7 @@ void Label::size_to_fit()
|
|||
|
||||
int Label::text_calculated_preferred_height() const
|
||||
{
|
||||
// FIXME: The 4 is taken from Gfx::Painter and should be available as
|
||||
// a constant instead.
|
||||
return Gfx::TextLayout(&font(), Utf8View { m_text }, text_rect()).bounding_rect(Gfx::TextWrapping::Wrap, 4).height();
|
||||
return Gfx::TextLayout(&font(), Utf8View { m_text }, text_rect()).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