diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-10-03 15:35:01 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-10-03 15:35:39 +0200 |
commit | 279e1dbfc5920103048fd4021c54906707251c21 (patch) | |
tree | e2f5a54761829d269b17399383b3f10afc67d9eb /Libraries | |
parent | 1d65cf367f08aaa0f6c5cbc3afc780839445864b (diff) | |
download | serenity-279e1dbfc5920103048fd4021c54906707251c21.zip |
LibHTML: Tweak "text-decoration: underline" look in LayoutText
Also remove some debug spam.
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibHTML/Layout/LayoutText.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Libraries/LibHTML/Layout/LayoutText.cpp b/Libraries/LibHTML/Layout/LayoutText.cpp index d9195e4018..a4739380b9 100644 --- a/Libraries/LibHTML/Layout/LayoutText.cpp +++ b/Libraries/LibHTML/Layout/LayoutText.cpp @@ -97,7 +97,7 @@ void LayoutText::render_fragment(RenderingContext& context, const LineBoxFragmen bool is_underline = text_decoration == "underline"; if (is_underline) - painter.draw_line(fragment.rect().bottom_left().translated(0, 1), fragment.rect().bottom_right().translated(0, 1), color); + painter.draw_line(fragment.rect().bottom_left().translated(0, -1), fragment.rect().bottom_right().translated(0, -1), color); painter.draw_text(fragment.rect(), node().data().substring_view(fragment.start(), fragment.length()), TextAlignment::TopLeft, color); } @@ -198,7 +198,6 @@ void LayoutText::split_into_lines(LayoutBlock& container) for_each_word([&](const Utf8View& view, int start, int length) { words.append({ Utf8View(view), start, length }); - dbg() << "Added _" << words.last().view.as_string() << "_"; }); for (int i = 0; i < words.size(); ++i) { |