mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 19:45:12 +00:00
LibHTML: Tweak "text-decoration: underline" look in LayoutText
Also remove some debug spam.
This commit is contained in:
parent
1d65cf367f
commit
279e1dbfc5
Notes:
sideshowbarker
2024-07-19 11:50:01 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/279e1dbfc59
1 changed files with 1 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue