diff options
author | Andreas Kling <kling@serenityos.org> | 2021-01-02 20:31:45 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-02 20:57:43 +0100 |
commit | 05f5d0dda3e27dcbbb5ad4060052859b9c821cf8 (patch) | |
tree | 53c33a79d7131901515df52e69a2de207facfe62 /Applications | |
parent | 0d44ee6f2bd5b6a4c8a101880f93e41e6cef9f54 (diff) | |
download | serenity-05f5d0dda3e27dcbbb5ad4060052859b9c821cf8.zip |
LibGfx: Add Gfx::TextAttributes (and use it in GUI::TextDocumentSpan)
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/Spreadsheet/CellSyntaxHighlighter.cpp | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/Applications/Spreadsheet/CellSyntaxHighlighter.cpp b/Applications/Spreadsheet/CellSyntaxHighlighter.cpp index f2202f1d85..c26d2aa238 100644 --- a/Applications/Spreadsheet/CellSyntaxHighlighter.cpp +++ b/Applications/Spreadsheet/CellSyntaxHighlighter.cpp @@ -47,23 +47,29 @@ void CellSyntaxHighlighter::rehighlight(Gfx::Palette palette) // Highlight the '=' m_editor->document().spans().empend( GUI::TextRange { { 0, 0 }, { 0, 1 } }, - palette.syntax_keyword(), - Optional<Color> {}, - false, - false, - false, - nullptr); + Gfx::TextAttributes { + palette.syntax_keyword(), + Optional<Color> {}, + false, + false, + }, + nullptr, + false); if (m_cell && m_cell->exception()) { auto range = m_cell->exception()->source_ranges().first(); GUI::TextRange text_range { { range.start.line - 1, range.start.column }, { range.end.line - 1, range.end.column - 1 } }; - m_editor->document().spans().prepend({ text_range, - Color::Black, - Color::Red, - false, - false, - false, - nullptr }); + m_editor->document().spans().prepend( + GUI::TextDocumentSpan { + text_range, + Gfx::TextAttributes { + Color::Black, + Color::Red, + false, + false, + }, + nullptr, + false }); } m_editor->update(); } |