ImpulseAdventure / GUIslice

GUIslice drag & drop embedded GUI in C for touchscreen TFT on Arduino, Raspberry Pi, ARM, ESP8266 / ESP32 / M5stack using Adafruit-GFX / TFT_eSPI / UTFT / SDL
https://www.impulseadventure.com/elec/guislice-gui.html
MIT License
1.12k stars 206 forks source link

Update XSpinner to use virtual elem instead of compound #461

Closed Pconti31 closed 2 years ago

Pconti31 commented 2 years ago

In issue 459MCU restarts using spinner control it was reported XSpinner is broken and crashes.

I investigated and found Compound Elements to be broken in GUIslice API since your commit of Support pending redraw for #328 committed on Jul 10, 2021 https://github.com/ImpulseAdventure/GUIslice/commit/b1f22d952af03f5c1075ea8c334ea534f1d2ebcf.

Since no other controls now use compound elements I simply rewrote XSpinner to no longer use compound elements. I tested this new XSpinner control on various hardware as did the user reporting the issue @rvxfahim on the Arduino mega. I also found the new control to be more responsive than the old version. Paul--

ImpulseAdventure commented 2 years ago

Great work, @Pconti31 !

As mentioned in #459, I might look at extracting out the DrawVirtualBtn and DrawVirtualTxt so that they can be more widely applied elsewhere. I will merge this as-is now and then look at that as an incremental update.