-
Notifications
You must be signed in to change notification settings - Fork 133
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
[LVGL] "Add Style" and "Remove Style" in LVGL action #450
Comments
I understand there is a need to dynamically change the style properties of the widget but I don't understand your proposition. I'm confused with the usage of term theme since we still don't support themes in LVGL projects. |
I should have used the term 'style' and not 'theme'. My bad. |
LVGL v9 supports a dynamic function to add a style to a widget which would allow dynamic changing of colors and styles in a way that changing a single style may change the look of all derived widgets that are using this style.
Basically what we need is
|
We already have this:
I agree, so the plan is to move from local widget styles to style objects and add a new action types (Add Style and Remove Style) to the LVGL action: |
Implemented. I added "Add Style" and "Remove Style" in LVGL action as explained in my previous comment. |
Is your feature request related to a problem? Please describe.
No, just a limitation.
Describe the solution you'd like
Add the option ‘apply theme’ to the LVGL widget. This needs 2 selections the widget the theme should be applied to and the theme that should be applied.
Only the set properties in the style (and parents of the style) should be applied, allowing for changing specific properties.
A common example is to allow for more colors depending on some kind of status/value. E.g. green/yellow/red
Describe alternatives you've considered
Currently the selection of themes is limited to states of the widget. In some cases you want to have more possibilities or is doesn’t align with the state (e.g. disabled).
Other option is to have multiple instances of the widget with different styles and show only the one you want. This is very cumbersome and not efficient.
Additional context
I’m not sure how to handle widgets inside user widgets:
Or maybe allow the user to choose by presenting individual instances and the user widget in the dropdownlist.
The text was updated successfully, but these errors were encountered: