| 14 | } |
| 15 | |
| 16 | void DataWidget::updateDarkMode() { |
| 17 | bool darkMode = isRunningInDarkMode(); |
| 18 | for (QTextEdit::ExtraSelection &selection : highlights) { |
| 19 | selection.format.setBackground(selection.format.colorProperty(QTextFormat::UserProperty + darkMode)); |
| 20 | } |
| 21 | updateAllHighlights(); |
| 22 | delete highlighter; |
| 23 | highlighter = new AsmHighlighter(document()); |
| 24 | } |
| 25 | |
| 26 | void DataWidget::clearAllHighlights() { |
| 27 | disconnect(this, &DataWidget::cursorPositionChanged, this, &DataWidget::highlightCurrentLine); |
no test coverage detected