Skip to content
Permalink
Browse files

Fix default highlighted text colors for code editors (fixes #21080)

  • Loading branch information
nirvn committed Jan 24, 2019
1 parent e6368a4 commit 7d2fe0417a4810b9b8e8ba2ed447fd6b33b9c13a
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/gui/qgscodeeditor.cpp
@@ -101,13 +101,14 @@ void QgsCodeEditor::setSciWidget()
colors.insert( key, QgsSymbolLayerUtils::decodeColor( ini.value( key ).toString() ) );
}
}
QPalette pal = qApp->palette();

setUtf8( true );
setCaretLineVisible( true );
setCaretLineBackgroundColor( colors.value( QStringLiteral( "caretLineColor" ), QColor( 252, 243, 237 ) ) );
setCaretForegroundColor( colors.value( QStringLiteral( "cursorColor" ), QColor( 51, 51, 51 ) ) );
setSelectionForegroundColor( colors.value( QStringLiteral( "selectionForegroundColorEditor" ), QColor( 48, 48, 48 ) ) );
setSelectionBackgroundColor( colors.value( QStringLiteral( "selectionBackgroundColor" ), QColor( 251, 251, 251 ) ) );
setSelectionForegroundColor( colors.value( QStringLiteral( "selectionForegroundColor" ), pal.color( QPalette::HighlightedText ) ) );
setSelectionBackgroundColor( colors.value( QStringLiteral( "selectionBackgroundColor" ), pal.color( QPalette::Highlight ) ) );

setBraceMatching( QsciScintilla::SloppyBraceMatch );
setMatchedBraceBackgroundColor( colors.value( QStringLiteral( "matchedBraceColor" ), QColor( 183, 249, 7 ) ) );

0 comments on commit 7d2fe04

Please sign in to comment.
You can’t perform that action at this time.