mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 21:26:22 +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
|
@ -1686,11 +1686,10 @@ void Painter::do_draw_text(IntRect const& rect, Utf8View const& text, Font const
|
|||
|
||||
TextLayout layout(&font, text, rect);
|
||||
|
||||
static int const line_spacing = 4;
|
||||
int line_height = font.pixel_size() + line_spacing;
|
||||
int line_height = font.pixel_size() + LINE_SPACING;
|
||||
|
||||
auto lines = layout.lines(elision, wrapping, line_spacing);
|
||||
auto bounding_rect = layout.bounding_rect(wrapping, line_spacing);
|
||||
auto lines = layout.lines(elision, wrapping, LINE_SPACING);
|
||||
auto bounding_rect = layout.bounding_rect(wrapping, LINE_SPACING);
|
||||
|
||||
switch (alignment) {
|
||||
case TextAlignment::TopCenter:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue