MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / addHighlight

Method addHighlight

gui/qt/datawidget.cpp:72–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72void DataWidget::addHighlight(const QColor &lightModeColor, const QColor &darkModeColor) {
73 QTextEdit::ExtraSelection selection;
74
75 selection.format.setBackground(isRunningInDarkMode() ? darkModeColor : lightModeColor);
76 selection.format.setProperty(QTextFormat::FullWidthSelection, true);
77 selection.format.setProperty(QTextFormat::UserProperty, lightModeColor);
78 selection.format.setProperty(QTextFormat::UserProperty + 1, darkModeColor);
79 selection.cursor = textCursor();
80 selection.cursor.movePosition(QTextCursor::StartOfLine);
81
82 highlights.append(selection);
83}
84
85void DataWidget::highlightCurrentLine() {
86 if (moveable) {

Callers 1

disasmLineMethod · 0.80

Calls 1

isRunningInDarkModeFunction · 0.85

Tested by

no test coverage detected