1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-21 06:53:01 +08:00

fix image colors in themes

This commit is contained in:
Gabor Kiss-Vamosi 2019-02-10 06:41:51 +01:00
parent 32017ff659
commit ad74d32f51
4 changed files with 14 additions and 2 deletions

View File

@ -615,6 +615,7 @@ static void list_init(void)
list_rel.body.border.opa = LV_OPA_COVER;
list_rel.text.color = lv_color_hsv_to_rgb(_hue, 10, 94);
list_rel.text.font = _font;
list_rel.image.color = lv_color_hsv_to_rgb(_hue, 10, 94);
lv_style_copy(&list_pr, &list_rel);
list_pr.body.empty = 0;
@ -622,6 +623,7 @@ static void list_init(void)
list_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 34, 41);
list_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 34, 41);
list_pr.text.color = lv_color_hsv_to_rgb(_hue, 7, 96);
list_pr.image.color = lv_color_hsv_to_rgb(_hue, 7, 96);
lv_style_copy(&list_trel, &list_rel);
lv_style_copy(&list_tpr, &list_pr);
@ -787,6 +789,7 @@ static void win_init(void)
header.body.border.color = lv_color_hsv_to_rgb(_hue, 20, 80);
header.body.border.part = LV_BORDER_BOTTOM;
header.text.color = lv_color_hsv_to_rgb(_hue, 5, 100);
header.image.color = lv_color_hsv_to_rgb(_hue, 5, 100);
theme.win.bg = &bg;
theme.win.sb = &sb;

View File

@ -72,6 +72,7 @@ static void basic_init(void)
panel.body.padding.ver = LV_DPI / 8;
panel.body.padding.inner = LV_DPI / 12;
panel.text.color = LV_COLOR_HEX3(0x333);
panel.image.color = LV_COLOR_HEX3(0x333);
lv_style_copy(&sb, &def);
sb.body.main_color = LV_COLOR_BLACK;
@ -768,6 +769,7 @@ static void win_init(void)
pr.body.empty = 0;
pr.body.radius = 0;
pr.text.color = LV_COLOR_HEX3(0x111);
pr.image.color = LV_COLOR_HEX3(0x111);
theme.win.bg = theme.panel;

View File

@ -129,8 +129,8 @@ static void btn_init(void)
lv_style_copy(&btn_ina, &btn_rel);
btn_ina.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20);
btn_ina.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20);
btn_ina.text.color = LV_COLOR_HEX3(0xaaa);
btn_ina.body.shadow.width = 0;
btn_ina.text.color = LV_COLOR_HEX3(0xaaa);
theme.btn.rel = &btn_rel;
theme.btn.pr = &btn_pr;
@ -678,6 +678,7 @@ static void win_init(void)
win_btn_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 10);
win_btn_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 10);
win_btn_pr.text.color = LV_COLOR_HEX3(0xaaa);
win_btn_pr.image.color = LV_COLOR_HEX3(0xaaa);
theme.win.bg = &win_bg;
theme.win.sb = &sb;

View File

@ -109,8 +109,8 @@ static void btn_init(void)
lv_style_copy(&pr, &rel);
pr.body.border.color = lv_color_hsv_to_rgb(_hue, 40, 60);
pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 60);
pr.body.shadow.width = 0;
pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 60);
lv_style_copy(&tgl_pr, &pr);
tgl_pr.body.border.color = lv_color_hsv_to_rgb(_hue, 40, 50);
@ -584,18 +584,22 @@ static void list_init(void)
rel.body.padding.hor = LV_DPI / 8;
rel.body.padding.ver = LV_DPI / 8;
rel.text.color = LV_COLOR_HEX3(0x666);
rel.image.color = LV_COLOR_HEX3(0x666);
lv_style_copy(&pr, &rel);
pr.text.color = theme.btn.pr->text.color;
pr.image.color = theme.btn.pr->image.color;
lv_style_copy(&tgl_rel, &rel);
tgl_rel.text.color = lv_color_hsv_to_rgb(_hue, 50, 90);
lv_style_copy(&tgl_pr, &rel);
tgl_pr.text.color = theme.btn.tgl_pr->text.color;
tgl_pr.image.color = theme.btn.tgl_pr->image.color;
lv_style_copy(&ina, &rel);
ina.text.color = theme.btn.ina->text.color;
ina.image.color = theme.btn.ina->image.color;
theme.list.sb = &sb;
theme.list.bg = &bg;
@ -732,9 +736,11 @@ static void win_init(void)
rel.body.empty = 1;
rel.body.border.width = 0;
rel.text.color = LV_COLOR_HEX3(0x666);
rel.image.color = LV_COLOR_HEX3(0x666);
lv_style_copy(&pr, &rel);
pr.text.color = LV_COLOR_HEX3(0x333);
pr.image.color = LV_COLOR_HEX3(0x333);
theme.win.bg = theme.panel;
theme.win.sb = &sb;