##// END OF EJS Templates
Merge pull request #3152 from Carreau/qtconsole-config-size...
Min RK -
r10191:403330a5 merge
parent child Browse files
Show More
@@ -155,6 +155,16 class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):
155 with the size of the font.
155 with the size of the font.
156 """)
156 """)
157
157
158 width = Integer(81, config=True,
159 help="""The width of the console at start time in number
160 of characters (will double with `hsplit` paging)
161 """)
162
163 height = Integer(25, config=True,
164 help="""The height of the console at start time in number
165 of characters (will double with `vsplit` paging)
166 """)
167
158 # Whether to override ShortcutEvents for the keybindings defined by this
168 # Whether to override ShortcutEvents for the keybindings defined by this
159 # widget (Ctrl+n, Ctrl+a, etc). Enable this if you want this widget to take
169 # widget (Ctrl+n, Ctrl+a, etc). Enable this if you want this widget to take
160 # priority (when it has focus) over, e.g., window-level menu shortcuts.
170 # priority (when it has focus) over, e.g., window-level menu shortcuts.
@@ -469,12 +479,12 class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):
469 # a fudge factor of one character here.
479 # a fudge factor of one character here.
470 # Note 2: QFontMetrics.maxWidth is not used here or anywhere else due
480 # Note 2: QFontMetrics.maxWidth is not used here or anywhere else due
471 # to a Qt bug on certain Mac OS systems where it returns 0.
481 # to a Qt bug on certain Mac OS systems where it returns 0.
472 width = font_metrics.width(' ') * 81 + margin
482 width = font_metrics.width(' ') * self.width + margin
473 width += style.pixelMetric(QtGui.QStyle.PM_ScrollBarExtent)
483 width += style.pixelMetric(QtGui.QStyle.PM_ScrollBarExtent)
474 if self.paging == 'hsplit':
484 if self.paging == 'hsplit':
475 width = width * 2 + splitwidth
485 width = width * 2 + splitwidth
476
486
477 height = font_metrics.height() * 25 + margin
487 height = font_metrics.height() * self.height + margin
478 if self.paging == 'vsplit':
488 if self.paging == 'vsplit':
479 height = height * 2 + splitwidth
489 height = height * 2 + splitwidth
480
490
General Comments 0
You need to be logged in to leave comments. Login now