The opacity default value seems to be 0%, i.e. fully transparent.
This strkes me as a bit perverse – I nearly always want 100% opacity.
So I need a line of code to set the style for opacity to 255 for each object.
Not a problem; just a nuisance.
Can the default value be changed?
Any comments? Thanks
It makes no sense that everyone can make posts in announcement and triggers am email to everyone who is registered. Sorry if I am repeating myself.
My apologies to all if I have put my post in the wrong place.
It makes sense. I’ve limited the Announcement category to “Trust level 3” members (meaning very active members who won’t opens a topic there by accident).
Just moved this topic to the “How-to” category.
I assume you are referring to bg_opa
. It’s really 0% by default (other opacities, such as border_opa
, arc_opa
, etc are 100% by default). It’s because if you remove all styles you should get a transparent widget.
I suggest using the simple theme which sets up some sane but very minimal default style values.
I’m a complete beginner with LVGL.
When setting up a button, for example, I do remove all styles first – perhaps I should not do so.
Then if I don’t add anything else, such as a border, the button is invisible!
But anyway, it is clearly meant to be this way.
I will try the simple theme.
Thanks for your reply.
I clicked the Solution box, but in fact I’ve still got a problem.
I have found the lv_theme_simple files, but have no idea how to use them in my code.
I am guessing that themes are third-party, since they were downloaded from github, and so there is no guidance on using them in the standard LVGL documentation.
Is there documentation on these somewhere else ?
Thanks, Ken.