mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Some more code to base class
This commit is contained in:
parent
7676789a49
commit
941adaa4a8
@ -172,18 +172,6 @@ class ShellScintilla(QgsCodeEditorPython):
|
||||
self.sessionHistoryCleared.connect(self.on_session_history_cleared)
|
||||
self.persistentHistoryCleared.connect(self.on_persistent_history_cleared)
|
||||
|
||||
def initializeLexer(self):
|
||||
super().initializeLexer()
|
||||
self.setCaretLineVisible(False)
|
||||
self.setLineNumbersVisible(False) # NO linenumbers for the input line
|
||||
self.setFoldingVisible(False)
|
||||
# Margin 1 is used for the '>>>' prompt (console input)
|
||||
self.setMarginLineNumbers(1, True)
|
||||
self.setMarginWidth(1, "00000")
|
||||
self.setMarginType(1, 5) # TextMarginRightJustified=5
|
||||
self.setMarginsBackgroundColor(self.color(QgsCodeEditorColorScheme.ColorRole.Background))
|
||||
self.setEdgeMode(QsciScintilla.EdgeNone)
|
||||
|
||||
def _setMinimumHeight(self):
|
||||
font = self.lexer().defaultFont(0)
|
||||
fm = QFontMetrics(font)
|
||||
|
@ -313,6 +313,18 @@ void QgsCodeEditor::runPostLexerConfigurationTasks()
|
||||
SendScintilla( SCI_MARKERSETBACK, SC_MARKNUM_FOLDER, lexerColor( QgsCodeEditorColorScheme::ColorRole::FoldIconForeground ) );
|
||||
SendScintilla( SCI_STYLESETFORE, STYLE_INDENTGUIDE, lexerColor( QgsCodeEditorColorScheme::ColorRole::IndentationGuide ) );
|
||||
SendScintilla( SCI_STYLESETBACK, STYLE_INDENTGUIDE, lexerColor( QgsCodeEditorColorScheme::ColorRole::IndentationGuide ) );
|
||||
|
||||
if ( mMode == QgsCodeEditor::Mode::CommandInput )
|
||||
{
|
||||
setCaretLineVisible( false );
|
||||
setLineNumbersVisible( false ); // NO linenumbers for the input line
|
||||
// Margin 1 is used for the '>' prompt (console input)
|
||||
setMarginLineNumbers( 1, true );
|
||||
setMarginWidth( 1, "00000" );
|
||||
setMarginType( 1, QsciScintilla::MarginType::TextMarginRightJustified );
|
||||
setMarginsBackgroundColor( color( QgsCodeEditorColorScheme::ColorRole::Background ) );
|
||||
setEdgeMode( QsciScintilla::EdgeNone );
|
||||
}
|
||||
}
|
||||
|
||||
void QgsCodeEditor::setSciWidget()
|
||||
|
Loading…
x
Reference in New Issue
Block a user