mirror of
https://github.com/RGBCube/serenity
synced 2025-07-16 11:37:39 +00:00
LibGfx: Add Gfx::TextAttributes (and use it in GUI::TextDocumentSpan)
This commit is contained in:
parent
0d44ee6f2b
commit
05f5d0dda3
11 changed files with 127 additions and 83 deletions
|
@ -100,8 +100,8 @@ void JSSyntaxHighlighter::rehighlight(Gfx::Palette palette)
|
|||
span.range.set_end({ position.line(), position.column() });
|
||||
auto type = is_trivia ? JS::TokenType::Invalid : token.type();
|
||||
auto style = style_for_token_type(palette, type);
|
||||
span.color = style.color;
|
||||
span.bold = style.bold;
|
||||
span.attributes.color = style.color;
|
||||
span.attributes.bold = style.bold;
|
||||
span.is_skippable = is_trivia;
|
||||
span.data = reinterpret_cast<void*>(static_cast<size_t>(type));
|
||||
spans.append(span);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue