New GUI can be drawn in terminal in case of terminal resizing
darxtrix opened this issue · comments
Listen for CMD +
& CMD -
and resize the app (stop the old app and redraw the form again). One more thing can be checked is horizontal vs vertical scaling. How it can fit in ?
Case 1 - Font resizing
Font changing in terminal(before & after rendering)
Scrolling can be an option ?
Tested with drawille, yes the terminal size changes with CMD+ and CMD- not only the font size is increased.
Case 2 - Terminal window resizing
This can be handled easily by checking change in terminal window sizing and then redrawing the GUI.
Solution => Keep listening for the size of the terminal and re-draw.
This will be also helpful
https://groups.google.com/forum/#!msg/npyscreen/anab-NQC_IY/8J4HeQJ-XCQJ;context-place=forum/npyscreen & resizing logic at http://npyscreen.readthedocs.io/form-objects.html
For both the cases now resizing is working but there are two limits that I am observing upper_limit and lower_limit of terminal sizes for which the re-sizing is not working. Need to fix that.
Terminal is responsive till size 104*28. Font resizing have not been tested.