TcMenu / tcMenuLib

TcMenu modular IoT menu library supporting rotary encoder, joysticks, many displays, and remote control over Ethernet and Serial
Apache License 2.0
111 stars 10 forks source link

Card layout does not properly calculate with icons in layout #202

Closed davetcc closed 1 year ago

davetcc commented 1 year ago

Describe the bug When there are icons in the layout, the card layout does not calculate properly and results in very poor rendering. See the tcMenu issue.

As card layout is not yet released, 4.0 will go out with this issue, and it will be fixed in 4.0.1

Confirm that the bug is in the embedded library Yes

Commerical or personal/community use Commercial davetcc

To Reproduce Have the home menu in grid mode, populated with icons.

Expected behavior Menu should render correctly

Screenshots See tcMenu issue

Device Specs Any

davetcc commented 1 year ago

I think most but maybe not all of the layout problems are caused by two things:

  1. the attempt to lazy recaclulate display order (now completely removed).
  2. the way active item is recalculated in the renderer. This is almost recalculated every time and is quite prone to failure.

Even if 1 and 2 don't fix all the issues, these refactorings are needed to clean up the code, in order to make it maintainable going forward. As it stands the renderers are too complex.

davetcc commented 1 year ago

Closing for now as complete, will open new issues for residual items as needed.