Skip to content
Permalink
Browse files

Fix rendering of matched brace colors in QgsCodeEditor

  • Loading branch information
nyalldawson committed Oct 7, 2020
1 parent 3f40dbf commit 1af2e51f87f035287bbc7f8bd18f8150a69cb534
@@ -70,6 +70,9 @@ void QgsCodeEditorCSS::initializeLexer()
lexer->setColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::Identifier ), QsciLexerCSS::CSS3Property );

setLexer( lexer );

setMatchedBraceForegroundColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::MatchedBraceForeground ) );
setMatchedBraceBackgroundColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::MatchedBraceBackground ) );
}

//
@@ -131,6 +131,9 @@ void QgsCodeEditorExpression::initializeLexer()
mSqlLexer->setColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::QuotedOperator ), QsciLexerSQL::QuotedOperator );

setLexer( mSqlLexer );

setMatchedBraceForegroundColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::MatchedBraceForeground ) );
setMatchedBraceBackgroundColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::MatchedBraceBackground ) );
}

void QgsCodeEditorExpression::updateApis()
@@ -69,4 +69,7 @@ void QgsCodeEditorHTML::initializeLexer()
lexer->setColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::DoubleQuote ), QsciLexerHTML::HTMLDoubleQuotedString );

setLexer( lexer );

setMatchedBraceForegroundColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::MatchedBraceForeground ) );
setMatchedBraceBackgroundColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::MatchedBraceBackground ) );
}
@@ -61,4 +61,7 @@ void QgsCodeEditorJavascript::initializeLexer()
lexer->setColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::Identifier ), QsciLexerJavaScript::Identifier );

setLexer( lexer );

setMatchedBraceForegroundColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::MatchedBraceForeground ) );
setMatchedBraceBackgroundColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::MatchedBraceBackground ) );
}
@@ -175,6 +175,9 @@ void QgsCodeEditorPython::initializeLexer()
setMarginsForegroundColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::MarginForeground ) );
setMarginsBackgroundColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::MarginBackground ) );

setMatchedBraceForegroundColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::MatchedBraceForeground ) );
setMatchedBraceBackgroundColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::MatchedBraceBackground ) );

setFoldingVisible( true );
setIndentationsUseTabs( false );
setIndentationGuides( true );
@@ -66,6 +66,9 @@ void QgsCodeEditorSQL::initializeLexer()
mSqlLexer->setColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::QuotedOperator ), QsciLexerSQL::QuotedOperator );

setLexer( mSqlLexer );

setMatchedBraceForegroundColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::MatchedBraceForeground ) );
setMatchedBraceBackgroundColor( lexerColor( QgsCodeEditorColorScheme::ColorRole::MatchedBraceBackground ) );
}

void QgsCodeEditorSQL::setFields( const QgsFields &fields )

0 comments on commit 1af2e51

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