Skip to content

feat(color): additions to Lvgl for Lua scripts#5179

Merged
pfeerick merged 5 commits into
mainfrom
philmoz/lua-lvgl-page
Jun 30, 2024
Merged

feat(color): additions to Lvgl for Lua scripts#5179
pfeerick merged 5 commits into
mainfrom
philmoz/lua-lvgl-page

Conversation

@philmoz

@philmoz philmoz commented Jun 14, 2024

Copy link
Copy Markdown
Collaborator

Create a Lua tool script with a header to match firmware pages.
Supports:

  • top left icon acts as RTN button like firmware pages
  • has title and subtitle lines
  • top left icon can be a custom image, or EdgeTX icon
  • 'back' action script called when RTN button pressed or top left button tapped.

Closes #1151, foundation for #4614 on colorlcd

screenshot_tx16s_24-06-14_15-58-21

screenshot_tx16s_24-06-14_17-45-29

Test script (updated to include multi page demo and QR code):
Lvgl Page Test Tool .lua.zip

@philmoz philmoz added this to the 2.11 milestone Jun 16, 2024
@pfeerick pfeerick changed the title feat(Lua): add 'page' option to Lvgl Lua tool scripts. feat(color): add 'page' option to Lvgl Lua tool scripts Jun 16, 2024
@pfeerick pfeerick added enhancement ✨ New feature or request color Related generally to color LCD radios labels Jun 16, 2024
@philmoz
philmoz force-pushed the philmoz/lua-lvgl-page branch from 8008243 to b96f5a8 Compare June 17, 2024 06:44
@pfeerick
pfeerick self-requested a review June 17, 2024 09:47
@philmoz
philmoz marked this pull request as draft June 17, 2024 23:14
@philmoz
philmoz marked this pull request as draft June 17, 2024 23:14
@philmoz

philmoz commented Jun 18, 2024

Copy link
Copy Markdown
Collaborator Author
lua.pages.mp4

@philmoz
philmoz force-pushed the philmoz/lua-lvgl-page branch 3 times, most recently from 265f6e2 to 5a40f6c Compare June 23, 2024 23:34
@philmoz philmoz changed the title feat(color): add 'page' option to Lvgl Lua tool scripts feat(color): additions to Lvgl for Lua scripts Jun 23, 2024
@philmoz

philmoz commented Jun 23, 2024

Copy link
Copy Markdown
Collaborator Author

New additions:

  • QRCode widget (only available for Lvgl Lua scripts)
  • Reduce memory overhead for stand alone Lvgl Lua scripts
  • Allow widget option colors to use theme colors and properly update when theme is changed

For the last point, if a widget option is a color value, and the color value is chosen from the 'SYS' selection (or the default is a theme color), then it will be maintained as a theme color. It will automatically update when the theme is changed on the radio.

Note: for existing models and widgets the colors are saved as RGB values and will not be automatically changed to theme colors. The widget color options need to be edited and set to a 'SYS' color for this to work.

QRCode example:
screenshot_tx16s_24-06-24_09-32-29

@philmoz
philmoz marked this pull request as ready for review June 23, 2024 23:42
@philmoz

philmoz commented Jun 24, 2024

Copy link
Copy Markdown
Collaborator Author

The changes to widget color options may fix issue #1151

@philmoz
philmoz force-pushed the philmoz/lua-lvgl-page branch from 62f55f3 to b2de5a2 Compare June 30, 2024 21:47
@pfeerick

Copy link
Copy Markdown
Member

LGTM. Can you update the demo script to your latest version (i.e. with the QR code).

@pfeerick
pfeerick merged commit 4d29d5d into main Jun 30, 2024
@pfeerick
pfeerick deleted the philmoz/lua-lvgl-page branch June 30, 2024 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

color Related generally to color LCD radios enhancement ✨ New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include default Widget Text Color in Theme

2 participants