| 13 | #include <QtWidgets/QMessageBox> |
| 14 | |
| 15 | BasicEditor::BasicEditor(QWidget *parent) : QPlainTextEdit(parent) |
| 16 | { |
| 17 | highlighter = new BasicHighlighter(document()); |
| 18 | lineNumberArea = new LineNumberArea(this); |
| 19 | |
| 20 | QFont font = QFont(QStringLiteral("TICELarge"), 11); |
| 21 | lineNumberArea->setFont(font); |
| 22 | |
| 23 | connect(this, &QPlainTextEdit::blockCountChanged, this, &BasicEditor::updateLineNumberAreaWidth); |
| 24 | connect(this, &QPlainTextEdit::updateRequest, this, &BasicEditor::updateLineNumberArea); |
| 25 | |
| 26 | updateLineNumberAreaWidth(0); |
| 27 | } |
| 28 | |
| 29 | void BasicEditor::updateDarkMode() |
| 30 | { |