What MCU/Processor/Board and compiler are you using?
LPC17xx, ESP32, …
What do you want to achieve?
Continue LvGL usage with the version 7 to get rid of the v6.x styles system
What have you tried so far?
Switched to branch “dev-7.0” --> basic functionality is OK
Code to reproduce
So - is there any quick “crash course” on using version 7? What I’m missing is how to get started with the new styles system, otherwise it seems to be much alike v6.x (except for animations )
I saw there are some commits on the “docs” repo, is there a way to see those locally?
Of course the hard way exists: wade through the source…
indeed, there is something about styles… Now I should just try to digest those (easier said than done).
One particular point: there used to be a global style definition “lv_style_scr”, from which all the other styles inherited. If I changed that (or other related built-in styles) right after calling “lv_init()”, it was easy to define some stuff globally, e.g. background colour(s). Is there anything similar in v7? My 20 min. source browsing session on this didn’t prove very fruitful.
I’m still updating the docs so we don’t have ready to use guide at this moment.
However the widgets and style parts are already written but will be still reviewed. (As I know myself it’s full of typos )
To answer your question about the background color: The background color property is not inherited so you can’t set a color for the screen and expect to see it in the children.
What you can do is to customize the theme you use or create your own theme. (The styles from the theme are applied to the object when they are created)
I had a quick glimpse on the docs, they seem to answer many questions which have raised during my short trial-and-error testing of V7.
I already copied the “theme_material”, moved it out of the lvgl “official” directory to keep the tree intact and made the changes there. This was also quite much trial-and-error (“oh, now it doesn’t find this and that include!”) but I managed to get it working. Now, how to use the new theme/style system, I think the docs you provided will get me going. To the correct direction, I hope
Hello, I’m new to LittlevGL too, so I’m wondering if I should start with v7 already.
I will also be using ESP32, so the port project is not working at this moment.
At this moment I cannot build it. Can I open a new thread to get some help on during this transition?
Or do you prefer to use github issues?
Here, the desired states are bitfields - but against how one might think, it seems that I cannot agregate those. I.e, the latter option where the states are ORed, only “FOCUSED” state becomes valid (gets the green colour). Is there something obvious I don’t get - or is it just designed to behave like that?
I followed a little the preprocessor art creating those “lv_style_get/set*” macros, but … well, you know
Can you add in a comment what else can be necessary?
You want to keep supporting v6 and v7 on the repo?
I think the easiest thing to do is make a release of the repo as is (zip it so the users can download it) and then port everything to v7, I don’t know if it’s possible to have two branches in a repo and each branch point to different submodule commits.