picotui
picotui copied to clipboard
Proper resizing support requires sufficiently deep codebase refactors
This is related to #48 and is demonstrated on top of #49.
After resize in the examples/example_screen_resize.py
, the use of arrow controls produces artifacts with dialog components being confused about their locations relative to the dialog.
Example:
https://user-images.githubusercontent.com/5355666/106370071-d6e16400-6324-11eb-8fa3-8327cee0ab37.mp4
Thanks for taking care to record video.
Yes, "resizing" support is experimental, and pretty hacked-up for now. There're at least 2 issues:
- Resize handling happens via asynchronous signals, and that's problematic and not reliable. Needs to be reworked to just produce a suitable synchronous event instead, like everything else.
- As you noticed (and I now remember), drawing setup isn't actually designed with relative coordinates in mind, and needs to be refactored (which is potentially backward incompatible change).
Some time ago I started to look into p.1, which turned out to be a bit of rabit hole due to https://www.python.org/dev/peps/pep-0475/ . It waits in backlog so far.