Skip to content

Fix initial terminal size

How initial terminal size is set:

  • TerminalDisplay calculates pixel size from requested columns/rows count, and uses it as size hint.
  • TabbedViewContainer, which wraps TerminalDisplay, and MainWindow, which wraps TabbedViewContainer, calculates their sizes from their children's size hints. It is assumed the size is equal to children's bounding rectangle size, eventually increased by visible margins.
  • TerminalDisplay adjusts its size to fill the window. In this case, this should change nothing.

QTabWidget's (TabbedViewContainer base class) sizeHint() includes some (nonexistent) margins added by widgets style (by default 22, 24 in Breeze), which propagated to window's sizeHint and finally increased TerminalDisplay size.

Reimplemented TabbedViewContainer::sizeHint() returns the size of its children's bounding rectangle.

Merge request reports