fyne-io / terminal

A graphical terminal emulator for Linux using Fyne
Other
247 stars 37 forks source link

resize when cols rows change and fix text scrambling #59

Closed figuerom16 closed 8 months ago

figuerom16 commented 8 months ago

Reduce resize updates when making small adjustments to window.

Text would occasionally scramble when shrinking the horizontal size. The fix is to make the t.content.Resize(...) width smaller than then t.BaseWidget.Resize(...)

Example of text staying scrambled on resize. scramble

andydotxyz commented 8 months ago

Thanks so much for this, I will have to test with a few apps and check. Out of interest what is the magic number 20 for?

figuerom16 commented 8 months ago

@andydotxyz That was there before so it's legacy. When I was testing the size never jumped below 20 randomly so I'm not sure if it's useful still, but I preserved it because I assumed there was a reason. It might be safe to delete? I'll test it again without it.

figuerom16 commented 8 months ago

Removed the min width check. Didn't seem to be doing anything.