LibGfx: Add Gfx::TextAttributes (and use it in GUI::TextDocumentSpan)

This commit is contained in:
Andreas Kling 2021-01-02 20:31:45 +01:00
parent 0d44ee6f2b
commit 05f5d0dda3
Notes: sideshowbarker 2024-07-19 00:11:38 +09:00
11 changed files with 127 additions and 83 deletions

View file

@ -72,8 +72,8 @@ void GMLSyntaxHighlighter::rehighlight(Gfx::Palette palette)
span.range.set_start({ token.m_start.line, token.m_start.column });
span.range.set_end({ token.m_end.line, token.m_end.column });
auto style = style_for_token_type(palette, token.m_type);
span.color = style.color;
span.bold = style.bold;
span.attributes.color = style.color;
span.attributes.bold = style.bold;
span.is_skippable = false;
span.data = reinterpret_cast<void*>(token.m_type);
spans.append(span);