Skip to content
Commit 6faf8b5b authored by Mariusz Glebocki's avatar Mariusz Glebocki Committed by Kurt Hindenburg
Browse files

Fix initial terminal size

How the initial terminal size is set:
* TerminalDisplay calculates size in pixels from requested columns/rows
  count, and uses it as the size hint.
* TabbedViewContainer, which wraps TerminalDisplay and QTabBar,
  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 2*2,
2*4 in Breeze). Those were propagated to the window size and were
increasing TerminalDisplay size.

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

(cherry picked from commit efb621d0)
parent 5676852b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment