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.
rects creates a temporary vector with all the rectangles and
returns the result, destructing in the end. we don't need that
if we are only interested in iterating thru the rects. QRegion
has begin / end so it's usable in Q_FOREACH and range based for.
This reverts commit d689ba5403.
I should have tested this more; this breaks a number of things as
switching doesn't execute the 'Command'. Since the next release is
close, let's just revert for now.
FIXED-IN: 19.08
CCBUG: 319926
This is not only style change, but also a bugfix.
Header and title font was unspecified, so terminal monospace font was
used in most cases. However, when new split with different orientation
was created, the font of splitted terminal changed to the system font.
Steps to reproduce:
* Split vertically - both titles use monospace font
* Split horizontally - splitted header's font changes to system default
Just after showing (i.e. in showEvent), contentsRect() width (or height)
is 0, which after calculations leads to _usedColumns (or _usedLines)
being equal to 1. Valid contentsRect() is restored just after showEvent,
and is available in resizeEvent.
Test:
* Split left/right
* Maximize one terminal
* Unmaximize
Without patch:
Previously hidden terminal appears with only one column painted
With patch:
Normal, fully painted terminal is shown.
Something in Qt has changed, so e. g. Super_L isn't passed as a modifier
anymore, so there's a regression from what
eea5ecfc5e fixed.
This is especially annoying e. g. for people using i3, where just
switching focus away with the keyboard will lead to Konsole scrolling
back to the bottom.
Move the build directory to the beginning of libraryPaths() so that
the build konsolepart is used. The CI installs and then runs tests,
so leave other paths as-is.
Also, fail instead of skipping if konsolepart is not found.