Fwd: Konsole | Fix initial terminal size (!15)

Mariusz Glebocki mglb at arccos-1.net
Fri Jul 12 16:46:59 BST 2019


https://invent.kde.org/kde/konsole/merge_requests/15

---------- Forwarded message ---------
From: Mariusz Glebocki <noreply at kde.org>
Date: Fri, Jul 12, 2019 at 5:45 PM
Subject: Konsole | Fix initial terminal size (!15)
To: <mglb at arccos-1.net>


Project:Branches: mglebocki/konsole:fix-initial-terminal-size →
kde/konsole:master

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 2*2, 2*4
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.


More information about the konsole-devel mailing list