Using menuconfig/kconfig makes it almost never necessary to change stuff on the lvgl.h config, but still some stuff that is needed, like enabling themes and fonts.
What would be an accepted way to change those settings without having to alter the lvgl or add all the possible options to menuconfig?
I might be wrong but editing the lv_conf file should do changes on the lvgl submodule as the lvgl submodule is the lvgl directory inside components/lvgl/lvgl
We can start by adding an option to the menuconfig to choose the theme and another option to choose the font from the available options, and then try to add a custom font/theme. I can try that this weekend.
Just started working on this, I’m working on a branch named lvgl_kconfig on the lv_port_esp32 repository. So far I’ve added a new LVGL configuration menu, this one is to configure the LVGL lib:
If you enter it you can find what i have so far, as today saturday february 29, enable built-in fonts:
There is a lot to be done, but I would like you to let me know what do you think and if i should follow this way with other configuration options, maybe you were meaning something else when asking about esp32 port config.
Nice, I don’t have as much free time as I would like, but I will try to keep adding more configuration options or maybe you or someone else can see what I did and contribute.
All of this is being done on the lvgl_kconfig branch as i said before, it will take a will until i finish, keep in mind that lv_port_esp32 is using an old version of lvgl and v7 will have even more options.
Is it ok to send PR and introduce to Kconfig some other option as well?
For example, in my project I’m using USER_DATA and a different LV_THEME_DEFAULT_FONT_SMALL, as well as set dark theme flag. It required lv_conf.h changes and then shows submodule changes. It is also not very convenient to keep such changes between repo copies. I would prefer to have them in the main project repo.
Sure, you can send a PR for LVGL configuration. The theme configuration is (I think) the most difficult to do, because it would enable the user to choose between a lot of possible configurations.
If you want to get started I would suggest to add enable/disable options for LVGL widgets.
These are themes from LVGL 6.1. In v7 the style system was rewritten, and for simplicity, most of the themes were not carried over to the new version. It’s easier to override themes in v7 and v8 so there wasn’t really a need to have multiple themes.