Cursor in text workout editor was invisible

Changed the background to a lighter color to get the cursor visible again. To achive a good contrast, the text color for the selected line is now black. This combination works for dark and light mode.
This commit is contained in:
enngq11k
2023-11-24 20:14:37 +01:00
committed by Mark Liversedge
parent 6e5b950f39
commit 0dd4bf6816

View File

@@ -117,7 +117,8 @@ void CodeEditor::highlightCurrentLine()
if (!isReadOnly()) {
QTextEdit::ExtraSelection selection;
selection.format.setBackground(lineAreaColor);
selection.format.setBackground(QColor(Qt::lightGray));
selection.format.setForeground(QColor(Qt::black));
selection.format.setProperty(QTextFormat::FullWidthSelection, true);
selection.cursor = textCursor();
selection.cursor.clearSelection();