contour
contour copied to clipboard
window size missmatch on init with kde
Description
"Bug" -> when i setup a terminal_size -> lines the resulting window seems to be to big by fontsize-1 pixel ... example lines = 4 https://i.imgur.com/A9sm3Xm.png
Environment
- Contour Version or Git commit hash: contour-git 0.3.0.r2113.ea7dbaa-1
- Operating System (name / distribution / version): Linux / arch / rolling -> actual
- Contour configuration: https://termbin.com/64ll
- TERM environment variable: xterm-256color
- Compiler version: gcc-Version 11.1.0 (GCC)
Steps to Reproduce
see description
Hey many thanks for your interest in our project.
I think what you mean is if your configure 10 lines you will only get 9, right?
I noticed that too and try to find a proper fix for it.
i tested with lines = 4 ... and i had 4 lines but also a big block not used (as you can see in the screenshot). Fun side effect -> i also noticed that 2 lines will be automatically 4 lines ;) seems like 4 is the minimum.
I would love to see some features specially around resizing with mouse -> like a switch which enables the window only to be resiszed in multiples of high and size of the font , but for the beginning i would be happy not to need to resize every time i open a terminal ...
i tested with lines = 4 ... and i had 4 lines but also a big block not used
Okay, that unused block at the bottom is actually padding - some unused area that is not big enough to be used for a new grid line. The underlying framework allows "hard" increments/decrements for window resizes, and some terminal emulators are giving you that kind of stairway-alike resize feeling to always fill 100% of the window contents area.
The cause of this gap is sadly not just a single variable, but I may think of some ways to mitigate that. Let's see.
I would love to see some features specially around resizing with mouse -> like a switch which enables the window only to be resiszed in multiples of high and size of the font , but for the beginning i would be happy not to need to resize every time i open a terminal ...
Lol, I should have read to the end before replying. I agree, as I already stated above. So let's treat your wish as a feature request. it's certainly doable.
i would expect this kind of padding if i would configured a pixel width x height -> like 800x200 , but when i give a fixed columns x row format i wouldn't expect there to be any padding. That leaves me with a question can i give a width x height format (so i can fix it in the config by calculating before?)
i would expect this kind of padding if i would configured a pixel width x height -> like 800x200 , but when i give a fixed columns x row format i wouldn't expect there to be any padding. That leaves me with a question can i give a width x height format (so i can fix it in the config by calculating before?)
Hey, no, the width/height are calculated using your lines/columns times the font height/width. The problem is in fact a bug (or lag of knowledge wrt. Qt libraries) in how I pass this information to the underlying windowing system. The API underneath expects width/height of the whole window, including decorations (title bar, border), however, the calculated values are the bare terminal widget part. I'll look into it to see how I can fix it along your other idea.
@Glog78 sorry for the super-late response. We have fixed that. If you want to try again & confirm using (somewhat) latest master branch, that would be lovely. :-)
Something ist strange:
contour version Contour Terminal Emulator 0.3.0-unreleased-makepkg-c4103667
my config -> https://termbin.com/waan
Ok once i start contour without anything it seems to work (aka no more lines spacing below the last text line) but instead of 45 lines its only 44 lines (see atached window)

once i use contour terminal profile frog it looks like this

on the second screenshot the spacing seems to be back and the amount of lines is totally off.
i wanted to leave a current status -> config -> https://termbin.com/x6bym
terminal started with -> contour profile rogue
tput cols = 129 tput lines = 29
^^ that's now really far away from the requested 120x40 in the rogue profile
Hey. We might soon migrate to Qt 6 plus QML and in the what existing wip branch, this problem doesn't exist anymore. We have other challenges to tackle first , however, before we can finish the qml port (such as making sure we can use Qt 6 everywhere. We will be working on that ASAP. And keep you posted :)