Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(color): Theme edit preview not working with LVGL styles #4180

Merged
merged 11 commits into from
Oct 30, 2023

Conversation

philmoz
Copy link
Collaborator

@philmoz philmoz commented Oct 8, 2023

After the libopenui refactor the theme editor preview no longer worked with screen elements defined entirely with LVGL styles (e.g. toggle switch and text button).

This PR cleans up the style management and fixes the theme preview to work correctly.

@pfeerick pfeerick added color Related generally to color LCD radios bug/regression ↩️ A new version of EdgeTX broke something labels Oct 8, 2023
@pfeerick pfeerick added this to the 2.10 milestone Oct 8, 2023
@philmoz philmoz force-pushed the fix-theme-preview branch from 53bead9 to 213277c Compare October 9, 2023 08:43
@raphaelcoeffic
Copy link
Member

@philmoz may I get a freePreviewStyle() to be called on page exit? (obviously after all LVGL components on the preview have been destroyed)

@philmoz
Copy link
Collaborator Author

philmoz commented Oct 13, 2023

may I get a freePreviewStyle() to be called on page exit? (obviously after all LVGL components on the preview have been destroyed)

Not sure about this. It could result in memory fragmentation if a user is playing with themes (free does not appear to coalesce adjacent blocks).

It's not using a lot of memory and will be gone on next restart.

@philmoz
Copy link
Collaborator Author

philmoz commented Oct 13, 2023

I've reduced the RAM overhead of the LVGL styles by converting them to constant styles where possible.

@pfeerick pfeerick changed the title fix(color): Fix theme edit preview to work with LVGL styles. fix(color): Fix theme edit preview to work with LVGL styles Oct 13, 2023
@pfeerick pfeerick changed the title fix(color): Fix theme edit preview to work with LVGL styles fix(color): Theme edit preview not working with LVGL styles Oct 13, 2023
@pfeerick pfeerick self-requested a review October 17, 2023 05:29
@pfeerick pfeerick merged commit 745bb8d into EdgeTX:main Oct 30, 2023
37 checks passed
@pfeerick pfeerick mentioned this pull request Oct 31, 2023
@philmoz philmoz deleted the fix-theme-preview branch January 24, 2024 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/regression ↩️ A new version of EdgeTX broke something color Related generally to color LCD radios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants