|
|
@@ -76,9 +76,8 @@ void WgtCodeEditor::highlightCurrentLine()
|
|
|
if (!isReadOnly()) {
|
|
|
QTextEdit::ExtraSelection selection;
|
|
|
|
|
|
- QColor lineColor = QColor(Qt::yellow).lighter(160);
|
|
|
|
|
|
- selection.format.setBackground(lineColor);
|
|
|
+ selection.format.setBackground(palette().alternateBase());
|
|
|
selection.format.setProperty(QTextFormat::FullWidthSelection, true);
|
|
|
selection.cursor = textCursor();
|
|
|
selection.cursor.clearSelection();
|
|
|
@@ -91,7 +90,7 @@ void WgtCodeEditor::highlightCurrentLine()
|
|
|
void WgtCodeEditor::lineNumberAreaPaintEvent(QPaintEvent *event)
|
|
|
{
|
|
|
QPainter painter(lineNumberArea);
|
|
|
- painter.fillRect(event->rect(), Qt::lightGray);
|
|
|
+ painter.fillRect(event->rect(), palette().alternateBase());
|
|
|
QTextBlock block = firstVisibleBlock();
|
|
|
int blockNumber = block.blockNumber();
|
|
|
int top = (int) blockBoundingGeometry(block).translated(contentOffset()).top();
|