summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-10-03 15:35:01 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-10-03 15:35:39 +0200
commit279e1dbfc5920103048fd4021c54906707251c21 (patch)
treee2f5a54761829d269b17399383b3f10afc67d9eb /Libraries
parent1d65cf367f08aaa0f6c5cbc3afc780839445864b (diff)
downloadserenity-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.cpp3
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) {