Show More
@@ -155,6 +155,16 b' 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 b' 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(' ') * |
|
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() * |
|
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