Great! by following the tutorial LittlevGL on a Monochrome OLED, it makes a difference, but there is still a problem.
the widgets that i created are all without boarder. should i use mono theme in such case?and what the paramters should i pass for the function, the prototype of the funciton is:
lv_theme_t * lv_theme_mono_init(lv_color_t color_primary, lv_color_t color_secondary, uint32_t flags, const lv_font_t * font_small, const lv_font_t * font_normal, const lv_font_t * font_subtitle, const lv_font_t * font_title)
In 7.0+ you no longer call the function directly, but instead change these lines in lv_conf.h
to the following:
#define LV_THEME_DEFAULT_INCLUDE <stdint.h> /*Include a header for the init. function*/
#define LV_THEME_DEFAULT_INIT lv_theme_mono_init
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_WHITE
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_BLACK
#define LV_THEME_DEFAULT_FLAG 0
If you want to invert the colors swap the primary and secondary lines.
That it is! it works!Great,thank you so much!
@ embeddedt The borders of lv_list, lv_win…are shown properly, but the lv_btn’s borders can not be shown, I used the code of lv_ex_btn_1.c, Is it not suitable udner monochrome condition for button widgets?