Skip to content

Add zoom-maximize feature to maximize with scaled font

Juerd Waalboer requested to merge juerd/konsole:master into master

This aims to duplicate the feature "scaled_zoom" of Terminator. This way of expanding the current terminal is only useful for split views that have both horizontal and vertical splits, i.e. where the individual terminal view is smaller than the window in both directions.

Although its use is limited, ever since I switched from Terminator to Konsole a few days ago, I have dearly missed this functionality. I use this dozens of times per day, and it was a question of getting Konsole to do the same thing, or switching back to Terminator. Please consider this commit for inclusion, as I would prefer not to maintain a local fork :)

The default shortcut is Ctrl+Shift+Z. It is usually bound to Redo, but since there's no Undo or Redo in terminals, this doesn't actually clash here.

The magic constant 0.97 comes from Terminator, although in Terminator the scale factor is calculated using the new number of columns/lines after resizing, while this commit bases the font size on the sizes in pixels. In the commit message that introduced the magic value in Terminator, it is explained as "just more natural", and it seems to work here too, unlike the vertical magical constant of 1.05. This is all mostly guesswork, though, as font sizes aren't an exact science - not even the aspect ratio is guaranteerd to remain the same between font sizes, just like the aspect ratio before and after maximizing could be different in the terminal.

Merge request reports