Skip to content

Commit

Permalink
vertical scrollbar as needed both input and output area
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa committed Oct 31, 2012
1 parent c729a0d commit 66368f9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions python/console.py
Expand Up @@ -281,6 +281,9 @@ def __init__(self, parent=None):
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.textEditOut.sizePolicy().hasHeightForWidth())
self.textEditOut.setSizePolicy(sizePolicy)

self.textEditOut.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
self.edit.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)

self.clearButton.triggered.connect(self.textEditOut.clearConsole)
self.optionsButton.triggered.connect(self.openSettings)
Expand Down
2 changes: 1 addition & 1 deletion python/console_output.py
Expand Up @@ -106,7 +106,7 @@ def __init__(self, parent=None):
#self.setEdgeColumn(80)
#self.setEdgeColor(QColor("#FF0000"))

self.SendScintilla(QsciScintilla.SCI_SETWRAPMODE, 2)
self.setWrapMode(QsciScintilla.WrapCharacter)
self.SendScintilla(QsciScintilla.SCI_SETHSCROLLBAR, 0)

self.runShortcut = QShortcut(QKeySequence(Qt.CTRL + Qt.Key_E), self)
Expand Down
5 changes: 2 additions & 3 deletions python/console_sci.py
Expand Up @@ -92,13 +92,12 @@ def __init__(self, parent=None):
# Use raw message to Scintilla here (all messages are documented
# here: http://www.scintilla.org/ScintillaDoc.html)
self.SendScintilla(QsciScintilla.SCI_SETHSCROLLBAR, 0)
self.SendScintilla(QsciScintilla.SCI_SETVSCROLLBAR, 1)

# not too small
#self.setMinimumSize(500, 300)
self.setMinimumHeight(50)
self.SendScintilla(QsciScintilla.SCI_SETWRAPMODE, 2)

self.setWrapMode(QsciScintilla.WrapCharacter)
self.SendScintilla(QsciScintilla.SCI_EMPTYUNDOBUFFER)

## Disable command key
Expand Down

0 comments on commit 66368f9

Please sign in to comment.