Correct way to add a custom theme without putting in lvgl project files


Is it documented how to add a custom theme correctly? I created one, but I have to put it in the lv_themes directory to get all the required includes. I don’t see any mention of custom themes in the 6.0 docs

What MCU/Processor/Board and compiler are you using?

arm-gcc on I.MXRT1052

What do you want to achieve?

Adding a custom theme, and keeping it separate from the lvgl core files

What have you tried so far?

Placing the theme file directly into the lvgl lv_themes file structure and modifying lv_conf.h to reference it.

Code to reproduce

There is no specific code for the question

Screenshot and/or video

There is no specific screenshot for the question.

You don’t really need to put it in lv_themes… you should be able to remove the #if LV_USE_THEME/#endif conditions at the top and bottom of the file and just use it.

And you can just include lvgl/lvgl.h at the top of the file as normal.

BTW: Thank you for filling out the template.