2024-03-20, 11:10 PM
(2024-03-20, 09:33 PM)nanocodebug Wrote: Oh this is fun! I see the image recoloring and gradients, I'll mess around with themeing system.
I'm partial to monochrome icons so I've been working on some custom battery icons, it would be neat if themes could extend to include icons on SD too (in some future).
Thanks!
Yeah, I hoped to be able to use styles directly to set image sources. Unfortunately afaict lvgl 8.3 doesn't support changing the img_src from styles, which is odd to me because it *does* support bg_img_src as a style property.
I think most likely what I'll end up doing for icons and images will be searching first in the theme directory for any overridden icons -- assuming each theme has its own directory with some optional images -- and if a theme provides them use those, otherwise use some inbuilt ones.
I'm also planning on replacing the battery icon with a white monochrome version that can be recoloured, or at least providing that as another option. We didn't actually know back when we designed those icons that lvgl could do image recolouring on our hardware.