Skip to content

fix(color): "gracefully" handles filechoice UI when too much file are present#7346

Closed
3djc wants to merge 3 commits into
mainfrom
3djc/fix-large-filecount-ui
Closed

fix(color): "gracefully" handles filechoice UI when too much file are present#7346
3djc wants to merge 3 commits into
mainfrom
3djc/fix-large-filecount-ui

Conversation

@3djc
Copy link
Copy Markdown
Collaborator

@3djc 3djc commented May 8, 2026

This fixes #7343

The heart of the issue is that the table holding the value exceeds the maximum coordinates accepted by LVGL in our current configuration.

This PR computes the number acceptable in a given hardware (screen resolution and layout does matter here).

If the number of files in a give choice exceed the limit, a too much file message is shown instead, and actual file number vs limits is also displayed in second line.

The alternative would be to move to LV_USE_LARGE_COORD accepting 32 bits coordinates, but the ripple effects of that would need to be understood.

NOT tested since I don't have a large enough sound list :D

@3djc 3djc added bug 🪲 Something isn't working backport/2.12 To be backported to a 2.12 release also. labels May 8, 2026
@pfeerick pfeerick added this to the 2.12.2 milestone May 9, 2026
@philmoz
Copy link
Copy Markdown
Collaborator

philmoz commented May 10, 2026

Using LV_USE_LARGE_COORD would be better since it eliminates the problem altogether.
The 'coord_t' type used in the firmware code is already an int (32 bits)

Tested on TX16S Mk2 and it works without any obvious issues.
Tested with > 1200 entries in the file choice popup menu.

One code change is required (in addition to setting LV_USE_LARGE_COORD to 1)
src/gui/colorlcd/libui/keyboard_base.cpp line 187

      setTop(max((coord_t)coords.y2 + 21, LCD_H - height()));

@3djc
Copy link
Copy Markdown
Collaborator Author

3djc commented May 10, 2026

Alternative is in #7358.

@pfeerick
Copy link
Copy Markdown
Member

Closing as #7358 fixes the underlying issue, and the rest is education / documentation related.

@pfeerick pfeerick closed this May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/2.12 To be backported to a 2.12 release also. bug 🪲 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: for file list popups, handle too many files occurance better

3 participants