Show More
@@ -155,6 +155,16 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):' | |||
|
155 | 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 | 168 | # Whether to override ShortcutEvents for the keybindings defined by this |
|
159 | 169 | # widget (Ctrl+n, Ctrl+a, etc). Enable this if you want this widget to take |
|
160 | 170 | # priority (when it has focus) over, e.g., window-level menu shortcuts. |
@@ -469,12 +479,12 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):' | |||
|
469 | 479 | # a fudge factor of one character here. |
|
470 | 480 | # Note 2: QFontMetrics.maxWidth is not used here or anywhere else due |
|
471 | 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 | 483 | width += style.pixelMetric(QtGui.QStyle.PM_ScrollBarExtent) |
|
474 | 484 | if self.paging == 'hsplit': |
|
475 | 485 | width = width * 2 + splitwidth |
|
476 | 486 | |
|
477 |
height = font_metrics.height() * |
|
|
487 | height = font_metrics.height() * self.height + margin | |
|
478 | 488 | if self.paging == 'vsplit': |
|
479 | 489 | height = height * 2 + splitwidth |
|
480 | 490 |
General Comments 0
You need to be logged in to leave comments.
Login now