Open rofl0r opened 5 years ago
Hi @rofl0r,
The empty space is not introduced by the HSplit
, but by the Window
instead. HSplit
has a padding option to create whitespace between children, but that's not what's happening. You can see it easily by setting a background-color on the Window. (Window(..., style='bg:ansired')
).
What happens is that a Window
can typically take any size, although it prefers the size of its content (unless ignore_content_height=False
would be given). But now, that the terminal window provides enough vertical space and each Window
can take any amount, the HSplit
divides it proportionally with the total height. You can fix it in this case, using:
height=Dimension(min=3, max=lines),
cool, thanks! is there an official way to assign a style to the "space-eater" window in the HSplit ? what i do now is:
controls['sidebar']._remaining_space_window.style = 'class:blah'
Hi @rofl0r,
Sorry for the very late reply. I think we have to fix this in prompt_toolkit. Both HSplit and VSplit have to be modified so that this _remaining_space_window
applies the padding style.
Would this work: https://github.com/prompt-toolkit/python-prompt-toolkit/pull/845/files ?
hi @jonathanslenders, i'd appreciate if you could give me a hint how to produce the desired effect.
what i'd like is basically
but what i get is