From 6d8ca9871ce6dce2d2e23ac7c46daa421b4a2465 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 5 Apr 2021 23:15:09 +0200 Subject: [PATCH] LibGfx: Move underline closer to text in draw_ui_text() --- Userland/Libraries/LibGfx/Painter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);