1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:37:43 +00:00

Spreadsheet: Add a syntax highlighter to the cell editor

This commit is contained in:
AnotherTest 2020-08-24 21:08:47 +04:30 committed by Andreas Kling
parent 8a5ce41065
commit de13c6939d
5 changed files with 109 additions and 2 deletions

View file

@ -25,6 +25,7 @@
*/
#include "SpreadsheetWidget.h"
#include "CellSyntaxHighlighter.h"
#include "HelpWindow.h"
#include <AK/JsonArray.h>
#include <AK/JsonObject.h>
@ -68,6 +69,7 @@ SpreadsheetWidget::SpreadsheetWidget()
auto& cell_value_editor = top_bar.add<GUI::TextEditor>(GUI::TextEditor::Type::SingleLine);
cell_value_editor.set_scrollbars_enabled(false);
cell_value_editor.set_syntax_highlighter(make<CellSyntaxHighlighter>());
cell_value_editor.set_enabled(false);
current_cell_label.set_enabled(false);