Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
No splitter, mellower colors
  • Loading branch information
dakcarto committed Oct 26, 2012
1 parent f15b4e1 commit 6870cff
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 19 deletions.
32 changes: 21 additions & 11 deletions python/console.py
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 7 additions & 3 deletions python/console_output.py
Expand Up @@ -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"))
Expand Down
10 changes: 5 additions & 5 deletions python/console_sci.py
Expand Up @@ -51,7 +51,7 @@ def __init__(self, parent=None):

self.buffer = []

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

for line in _init_commands:
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit 6870cff

Please sign in to comment.