diff --git a/lv_themes/lv_theme_alien.c b/lv_themes/lv_theme_alien.c index 2babbb1e3..90d699d8a 100644 --- a/lv_themes/lv_theme_alien.c +++ b/lv_themes/lv_theme_alien.c @@ -811,16 +811,7 @@ static void style_mod(lv_style_t * style) #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_ORANGE; - - /*If not empty or has border then emphasis the border*/ - if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); - - style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.border.color = lv_color_hsv_to_rgb(_hue, 70, 90); #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; diff --git a/lv_themes/lv_theme_material.c b/lv_themes/lv_theme_material.c index 5912f826f..2fc54789c 100644 --- a/lv_themes/lv_theme_material.c +++ b/lv_themes/lv_theme_material.c @@ -790,16 +790,16 @@ static void style_mod(lv_style_t * style) #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_ORANGE; + style->body.border.color = lv_color_hsv_to_rgb(_hue, 90, 70); /*If not empty or has border then emphasis the border*/ if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); + style->body.main_color = lv_color_mix(style->body.main_color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_60); - style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); + style->text.color = lv_color_mix(style->text.color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; diff --git a/lv_themes/lv_theme_mono.c b/lv_themes/lv_theme_mono.c index 5ed43c209..982e7703f 100644 --- a/lv_themes/lv_theme_mono.c +++ b/lv_themes/lv_theme_mono.c @@ -417,16 +417,10 @@ static void style_mod(lv_style_t * style) #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_ORANGE; + style->body.border.color = LV_COLOR_BLACK; /*If not empty or has border then emphasis the border*/ if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); - - style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; @@ -439,16 +433,10 @@ static void style_mod_edit(lv_style_t * style) #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_GREEN; + style->body.border.color = LV_COLOR_BLACK; /*If not empty or has border then emphasis the border*/ if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); - - style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; diff --git a/lv_themes/lv_theme_nemo.c b/lv_themes/lv_theme_nemo.c index 8d62e2e83..b9bd21fc3 100644 --- a/lv_themes/lv_theme_nemo.c +++ b/lv_themes/lv_theme_nemo.c @@ -784,18 +784,15 @@ static void win_init(void) static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 - /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_ORANGE; - - /*If not empty or has border then emphasis the border*/ - if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); - - style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.border.width = 2; + style->body.border.color = LV_COLOR_SILVER; + style->body.border.opa = LV_OPA_70; + style->body.padding.hor = 0; + style->body.padding.ver = 0; + style->body.shadow.width = LV_DPI / 20; + style->body.shadow.color = lv_color_hsv_to_rgb(_hue, 20, 90); + style->body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80); + style->body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 80); #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; @@ -803,28 +800,6 @@ static void style_mod(lv_style_t * style) #endif } -static void style_mod_edit(lv_style_t * style) -{ -#if LV_COLOR_DEPTH != 1 - /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_GREEN; - - /*If not empty or has border then emphasis the border*/ - if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); - - style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); -#else - style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_BLACK; - style->body.border.width = 3; -#endif -} - /********************** * GLOBAL FUNCTIONS **********************/ @@ -881,7 +856,7 @@ lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font) win_init(); theme.group.style_mod = style_mod; - theme.group.style_mod_edit = style_mod_edit; + theme.group.style_mod_edit = style_mod; return &theme; } diff --git a/lv_themes/lv_theme_night.c b/lv_themes/lv_theme_night.c index abbbc493c..ee99285c9 100644 --- a/lv_themes/lv_theme_night.c +++ b/lv_themes/lv_theme_night.c @@ -700,16 +700,10 @@ static void style_mod(lv_style_t * style) #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_ORANGE; + style->body.border.color = lv_color_hsv_to_rgb(_hue, 80, 70); /*If not empty or has border then emphasis the border*/ if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); - - style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; @@ -726,12 +720,6 @@ static void style_mod_edit(lv_style_t * style) /*If not empty or has border then emphasis the border*/ if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); - - style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; diff --git a/lv_themes/lv_theme_zen.c b/lv_themes/lv_theme_zen.c index da7ac37db..4419ebc6b 100644 --- a/lv_themes/lv_theme_zen.c +++ b/lv_themes/lv_theme_zen.c @@ -763,16 +763,10 @@ static void style_mod(lv_style_t * style) #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_ORANGE; + style->body.border.color = lv_color_hsv_to_rgb(_hue, 40, 50); /*If not empty or has border then emphasis the border*/ if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); - - style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK;