diff options
author | Andreas Kling <kling@serenityos.org> | 2021-04-05 23:15:09 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-05 23:15:43 +0200 |
commit | 6d8ca9871ce6dce2d2e23ac7c46daa421b4a2465 (patch) | |
tree | 7f6d594cec1a3b12d8a844346e8adc5a58ecc055 | |
parent | 516868e197b00d6c2af374e9fb99b4a232a89e90 (diff) | |
download | serenity-6d8ca9871ce6dce2d2e23ac7c46daa421b4a2465.zip |
LibGfx: Move underline closer to text in draw_ui_text()
-rw-r--r-- | Userland/Libraries/LibGfx/Painter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGfx/Painter.cpp b/Userland/Libraries/LibGfx/Painter.cpp index c4ad9e79c7..fa63fb3f5c 100644 --- a/Userland/Libraries/LibGfx/Painter.cpp +++ b/Userland/Libraries/LibGfx/Painter.cpp @@ -1840,7 +1840,7 @@ void Gfx::Painter::draw_ui_text(const StringView& text, const Gfx::IntRect& rect int width = 0; for (auto it = utf8_view.begin(); it != utf8_view.end(); ++it) { if (utf8_view.byte_offset_of(it) >= underline_offset.value()) { - int y = text_rect.bottom() + 2; + int y = text_rect.bottom() + 1; int x1 = text_rect.left() + width; int x2 = x1 + font.glyph_or_emoji_width(*it); draw_line({ x1, y }, { x2, y }, Color::Black); |