MCPcopy Create free account
hub / github.com/Cubitect/cubiomes-viewer / highlightCurrentLine

Method highlightCurrentLine

src/scripts.cpp:574–587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

572}
573
574void ScriptEditor::highlightCurrentLine()
575{
576 QList<QTextEdit::ExtraSelection> extraSelections;
577 QTextEdit::ExtraSelection selection;
578
579 QColor lineColor = QColor::fromRgb(255, 255, 0, 28);
580 selection.format.setBackground(lineColor);
581 selection.format.setProperty(QTextFormat::FullWidthSelection, true);
582 selection.cursor = textCursor();
583 selection.cursor.clearSelection();
584 extraSelections.append(selection);
585
586 setExtraSelections(extraSelections);
587}
588
589void ScriptEditor::paintLineNumbers(QPaintEvent *event)
590{

Callers

nothing calls this directly

Calls 1

clearSelectionMethod · 0.80

Tested by

no test coverage detected