diff --git a/src/Gui/DlgEditorImp.cpp b/src/Gui/DlgEditorImp.cpp index 7b23a1e21..c4d1d283d 100644 --- a/src/Gui/DlgEditorImp.cpp +++ b/src/Gui/DlgEditorImp.cpp @@ -115,6 +115,10 @@ DlgSettingsEditorImp::DlgSettingsEditorImp( QWidget* parent ) unsigned long lPyError = (col.red() << 24) | (col.green() << 16) | (col.blue() << 8); d->colormap.push_back(QPair (QString::fromAscii(QT_TR_NOOP("Python error")), lPyError)); + col.setRgb(224, 224, 224); + unsigned long lCLine = (col.red() << 24) | (col.green() << 16) | (col.blue() << 8); + d->colormap.push_back(QPair + (QString::fromAscii(QT_TR_NOOP("Current line highlight")), lCLine)); QStringList labels; labels << tr("Items"); this->displayItems->setHeaderLabels(labels); diff --git a/src/Gui/PythonEditor.cpp b/src/Gui/PythonEditor.cpp index c79a51814..5b448633a 100644 --- a/src/Gui/PythonEditor.cpp +++ b/src/Gui/PythonEditor.cpp @@ -61,7 +61,7 @@ struct PythonEditorP colormap[QLatin1String("Operator")] = QColor(160, 160, 164); colormap[QLatin1String("Python output")] = QColor(170, 170, 127); colormap[QLatin1String("Python error")] = Qt::red; - colormap[QLatin1String("Line")] = QColor(224,224,224); + colormap[QLatin1String("Current line highlight")] = QColor(224,224,224); } }; } // namespace Gui diff --git a/src/Gui/TextEdit.cpp b/src/Gui/TextEdit.cpp index 75fb88c1d..bbb06d8b6 100644 --- a/src/Gui/TextEdit.cpp +++ b/src/Gui/TextEdit.cpp @@ -192,7 +192,7 @@ struct TextEditorP colormap[QLatin1String("Operator")] = QColor(160, 160, 164); colormap[QLatin1String("Python output")] = QColor(170, 170, 127); colormap[QLatin1String("Python error")] = Qt::red; - colormap[QLatin1String("Line")] = QColor(224,224,224); + colormap[QLatin1String("Current line highlight")] = QColor(224,224,224); } }; } // namespace Gui @@ -272,8 +272,11 @@ void TextEditor::highlightCurrentLine() if (!isReadOnly()) { QTextEdit::ExtraSelection selection; - QColor lineColor = d->colormap[QLatin1String("Line")]; - + QColor lineColor = d->colormap[QLatin1String("Current line highlight")]; + unsigned long col = (lineColor.red() << 24) | (lineColor.green() << 16) | (lineColor.blue() << 8); + ParameterGrp::handle hPrefGrp = getWindowParameter(); + col = hPrefGrp->GetUnsigned( "Current line highlight", col); + lineColor.setRgb((col>>24)&0xff, (col>>16)&0xff, (col>>8)&0xff); selection.format.setBackground(lineColor); selection.format.setProperty(QTextFormat::FullWidthSelection, true); selection.cursor = textCursor();