Fix initial terminal size

Authored by mglb on Jul 11 2019, 9:52 PM.

Description

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 efb621d091c05f1195982667782507ffe27ed8cf)

Details

Committed
hindenburgJul 20 2019, 7:06 PM
Parents
R319:5676852b88f9: GIT_SILENT Upgrade KDE Applications version to 19.07.80.
Branches
Unknown
Tags
Unknown