1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

LibGfx+Userland: Make TextAttributes::underline_style optional

Rather than having a style AND a field saying whether to use the style,
just make the style Optional.
This commit is contained in:
Sam Atkins 2023-03-15 12:35:00 +00:00 committed by Andreas Kling
parent 609b616085
commit 6d8f046fd0
10 changed files with 16 additions and 19 deletions

View file

@ -1391,9 +1391,8 @@ void TextDocument::merge_span_collections()
merged_span.span.attributes.color = span_and_collection_index.collection_index > last_span_and_collection_index.collection_index ? span.attributes.color : last_span.attributes.color;
merged_span.span.attributes.bold = span.attributes.bold | last_span.attributes.bold;
merged_span.span.attributes.background_color = span.attributes.background_color.has_value() ? span.attributes.background_color.value() : last_span.attributes.background_color;
merged_span.span.attributes.underline = span.attributes.underline | last_span.attributes.underline;
merged_span.span.attributes.underline_color = span.attributes.underline_color.has_value() ? span.attributes.underline_color.value() : last_span.attributes.underline_color;
merged_span.span.attributes.underline_style = span.attributes.underline_style;
merged_span.span.attributes.underline_style = span.attributes.underline_style.has_value() ? span.attributes.underline_style : last_span.attributes.underline_style;
merged_spans.append(move(merged_span));
if (span.range.end() == last_span.range.end())