Skip to content
Permalink
Browse files

Merge pull request #2 from dakcarto/console-nosplitter_1

No splitter, mellower colors
  • Loading branch information
slarosa committed Oct 26, 2012
2 parents f15b4e1 + 6870cff commit dd570c08d1d292c9a3cdc6c34dcee2993ae0c31a
Showing with 33 additions and 19 deletions.
  1. +21 −11 python/console.py
  2. +7 −3 python/console_output.py
  3. +5 −5 python/console_sci.py
@@ -88,12 +88,6 @@ def __init__(self, parent=None):
#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 @@ def __init__(self, parent=None):
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 @@ def __init__(self, parent=None):
# 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 @@ def __init__(self, parent=None):

self.buffer = []

self.insertInitText()
#self.insertInitText()
self.displayPrompt(False)

for line in _init_commands:
@@ -69,8 +69,8 @@ def __init__(self, parent=None):
#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 @@ def __init__(self, parent=None):

# 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 @@ def clearConsole(self):
"""Clear the contents of the console."""
self.SendScintilla(QsciScintilla.SCI_CLEARALL)
#self.setText('')
self.insertInitText()
#self.insertInitText()
self.displayPrompt(False)
self.setFocus()

0 comments on commit dd570c0

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