mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
No splitter, mellower colors
This commit is contained in:
parent
f15b4e12c7
commit
6870cff83f
@ -88,12 +88,6 @@ class PythonConsoleWidget(QWidget):
|
||||
#self.widgetEditors = QWidget()
|
||||
|
||||
self.options = optionsDialog(self)
|
||||
|
||||
self.splitter = QSplitter(self)
|
||||
self.splitter.setOrientation(Qt.Vertical)
|
||||
self.splitter.setHandleWidth(3)
|
||||
self.splitter.setChildrenCollapsible(False)
|
||||
|
||||
#self.textEdit = QTextEdit()
|
||||
|
||||
self.toolBar = QToolBar()
|
||||
@ -284,11 +278,27 @@ class PythonConsoleWidget(QWidget):
|
||||
self.widgetButton.setSizePolicy(sizePolicy)
|
||||
#self.e.addWidget(self.textEdit)
|
||||
#self.e.addWidget(self.edit)
|
||||
|
||||
self.splitter.addWidget(self.textEditOut)
|
||||
self.splitter.addWidget(self.edit)
|
||||
self.f.addWidget(self.widgetButton, 0, 0, 1, 1)
|
||||
self.f.addWidget(self.splitter, 0, 1, 1, 1)
|
||||
|
||||
self.consoleFrame = QFrame(self)
|
||||
self.consoleFrame.setObjectName("consoleFrame")
|
||||
self.consoleLayout = QVBoxLayout(self.consoleFrame)
|
||||
self.consoleLayout.setSpacing(0)
|
||||
self.consoleLayout.setMargin(0)
|
||||
|
||||
sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.textEditOut.sizePolicy().hasHeightForWidth())
|
||||
self.textEditOut.setSizePolicy(sizePolicy)
|
||||
self.consoleLayout.addWidget(self.textEditOut)
|
||||
|
||||
self.edit.setMinimumSize(QSize(0, 32))
|
||||
self.edit.setMaximumSize(QSize(16777215, 32))
|
||||
self.consoleLayout.addWidget(self.edit)
|
||||
|
||||
|
||||
self.f.addWidget(self.widgetButton, 0, 0)
|
||||
self.f.addWidget(self.consoleFrame, 0, 1)
|
||||
#self.f.addWidget(self.widgetEditors)
|
||||
|
||||
#self.f.setStretchFactor(self.widgetEditors, 1)
|
||||
|
@ -86,10 +86,14 @@ class EditorOutput(QsciScintilla):
|
||||
# Margin 0 is used for line numbers
|
||||
#fm = QFontMetrics(font)
|
||||
self.setMarginsFont(font)
|
||||
self.setMarginWidth(1, "000")
|
||||
self.setMarginWidth(1, "00000")
|
||||
self.setMarginLineNumbers(1, True)
|
||||
self.setMarginsBackgroundColor(QColor("#ffe4e4"))
|
||||
|
||||
self.setMarginsForegroundColor(QColor("#3E3EE3"))
|
||||
self.setMarginsBackgroundColor(QColor("#f9f9f9"))
|
||||
self.setCaretLineVisible(True)
|
||||
self.setCaretLineBackgroundColor(QColor("#fcf3ed"))
|
||||
|
||||
|
||||
# Folding
|
||||
#self.setFolding(QsciScintilla.BoxedTreeFoldStyle)
|
||||
#self.setFoldMarginColors(QColor("#99CC66"),QColor("#333300"))
|
||||
|
@ -51,7 +51,7 @@ class PythonEdit(QsciScintilla, code.InteractiveInterpreter):
|
||||
|
||||
self.buffer = []
|
||||
|
||||
self.insertInitText()
|
||||
#self.insertInitText()
|
||||
self.displayPrompt(False)
|
||||
|
||||
for line in _init_commands:
|
||||
@ -69,8 +69,8 @@ class PythonEdit(QsciScintilla, code.InteractiveInterpreter):
|
||||
#self.selectToMatchingBrace()
|
||||
|
||||
# Current line visible with special background color
|
||||
self.setCaretLineVisible(True)
|
||||
self.setCaretLineBackgroundColor(QColor("#ffe4e4"))
|
||||
#self.setCaretLineVisible(True)
|
||||
#self.setCaretLineBackgroundColor(QColor("#ffe4e4"))
|
||||
self.setCaretWidth(2)
|
||||
|
||||
# Set Python lexer
|
||||
@ -98,7 +98,7 @@ class PythonEdit(QsciScintilla, code.InteractiveInterpreter):
|
||||
|
||||
# not too small
|
||||
#self.setMinimumSize(500, 300)
|
||||
self.setMinimumHeight(60)
|
||||
self.setMinimumHeight(32)
|
||||
|
||||
self.SendScintilla(QsciScintilla.SCI_SETWRAPMODE, 2)
|
||||
self.SendScintilla(QsciScintilla.SCI_EMPTYUNDOBUFFER)
|
||||
@ -132,7 +132,7 @@ class PythonEdit(QsciScintilla, code.InteractiveInterpreter):
|
||||
"""Clear the contents of the console."""
|
||||
self.SendScintilla(QsciScintilla.SCI_CLEARALL)
|
||||
#self.setText('')
|
||||
self.insertInitText()
|
||||
#self.insertInitText()
|
||||
self.displayPrompt(False)
|
||||
self.setFocus()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user