mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
LibGfx: Add Gfx::TextAttributes (and use it in GUI::TextDocumentSpan)
This commit is contained in:
@@ -90,8 +90,8 @@ void CppSyntaxHighlighter::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 = token.m_type == Cpp::Token::Type::Whitespace;
|
||||
span.data = reinterpret_cast<void*>(token.m_type);
|
||||
spans.append(span);
|
||||
|
||||
Reference in New Issue
Block a user