Enable hasp light theme

This commit is contained in:
fvanroie 2020-12-19 19:02:36 +01:00
parent a8591db8c9
commit f2a08d87cd

View File

@ -128,7 +128,6 @@ bool get_page_id(lv_obj_t * obj, uint8_t * pageid)
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////
void haspDisconnect() void haspDisconnect()
{ {
@ -293,6 +292,8 @@ void haspSetup()
if(haspThemeId <= 0 || haspThemeId > 5) haspThemeId = 1; // check bounds if(haspThemeId <= 0 || haspThemeId > 5) haspThemeId = 1; // check bounds
lv_theme_t * th = NULL; lv_theme_t * th = NULL;
lv_theme_hasp_flag_t flags = LV_THEME_HASP_FLAG_LIGHT;
switch(haspThemeId) { switch(haspThemeId) {
#if(LV_USE_THEME_EMPTY == 1) #if(LV_USE_THEME_EMPTY == 1)
case 0: case 0:
@ -303,12 +304,12 @@ void haspSetup()
#if(LV_USE_THEME_HASP == 1) #if(LV_USE_THEME_HASP == 1)
case 2: // Dark case 2: // Dark
flags = LV_THEME_HASP_FLAG_DARK;
case 1: // Light case 1: // Light
case 8: // Light (old id) case 8: // Light (old id)
th = lv_theme_hasp_init(lv_color_hsv_to_rgb(haspThemeHue, 100, 100), th = lv_theme_hasp_init(lv_color_hsv_to_rgb(haspThemeHue, 100, 100),
lv_color_hsv_to_rgb(haspThemeHue, 100, 100), lv_color_hsv_to_rgb(haspThemeHue, 100, 100), flags + LV_THEME_HASP_FLAG_NO_FOCUS,
LV_THEME_HASP_FLAG_DARK + LV_THEME_HASP_FLAG_NO_FOCUS, haspFonts[0], haspFonts[1], haspFonts[0], haspFonts[1], haspFonts[2], haspFonts[3]);
haspFonts[2], haspFonts[3]);
break; break;
#endif #endif