Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix default highlighted text colors for code editors (fixes #21080)
  • Loading branch information
nirvn committed Jan 24, 2019
1 parent e6368a4 commit 7d2fe04
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/qgscodeeditor.cpp
Expand Up @@ -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 ) ) );
Expand Down

0 comments on commit 7d2fe04

Please sign in to comment.