Skip to content

Commit 66368f9

Browse files
committed
vertical scrollbar as needed both input and output area
1 parent c729a0d commit 66368f9

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

python/console.py

+3
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ def __init__(self, parent=None):
281281
sizePolicy.setVerticalStretch(0)
282282
sizePolicy.setHeightForWidth(self.textEditOut.sizePolicy().hasHeightForWidth())
283283
self.textEditOut.setSizePolicy(sizePolicy)
284+
285+
self.textEditOut.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
286+
self.edit.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
284287

285288
self.clearButton.triggered.connect(self.textEditOut.clearConsole)
286289
self.optionsButton.triggered.connect(self.openSettings)

python/console_output.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def __init__(self, parent=None):
106106
#self.setEdgeColumn(80)
107107
#self.setEdgeColor(QColor("#FF0000"))
108108

109-
self.SendScintilla(QsciScintilla.SCI_SETWRAPMODE, 2)
109+
self.setWrapMode(QsciScintilla.WrapCharacter)
110110
self.SendScintilla(QsciScintilla.SCI_SETHSCROLLBAR, 0)
111111

112112
self.runShortcut = QShortcut(QKeySequence(Qt.CTRL + Qt.Key_E), self)

python/console_sci.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,12 @@ def __init__(self, parent=None):
9292
# Use raw message to Scintilla here (all messages are documented
9393
# here: http://www.scintilla.org/ScintillaDoc.html)
9494
self.SendScintilla(QsciScintilla.SCI_SETHSCROLLBAR, 0)
95-
self.SendScintilla(QsciScintilla.SCI_SETVSCROLLBAR, 1)
9695

9796
# not too small
9897
#self.setMinimumSize(500, 300)
9998
self.setMinimumHeight(50)
100-
101-
self.SendScintilla(QsciScintilla.SCI_SETWRAPMODE, 2)
99+
100+
self.setWrapMode(QsciScintilla.WrapCharacter)
102101
self.SendScintilla(QsciScintilla.SCI_EMPTYUNDOBUFFER)
103102

104103
## Disable command key

0 commit comments

Comments
 (0)