feat(color): use colors from material design

Use function instead of color macros
This commit is contained in:
Gabor Kiss-Vamosi
2021-02-23 15:03:06 +01:00
parent 8740046efc
commit cbfbcb47f9
60 changed files with 475 additions and 222 deletions

View File

@@ -26,13 +26,13 @@ static void event_cb(lv_obj_t * obj, lv_event_t e)
if(lv_area_get_width(&bar->indic_area) > txt_size.x + 20) {
txt_area.x2 = bar->indic_area.x2 - 5;
txt_area.x1 = txt_area.x2 - txt_size.x + 1;
dsc.color = LV_COLOR_WHITE;
dsc.color = lv_color_white();
}
/*If the indicator is still short put the text out of it on the right */
else {
txt_area.x1 = bar->indic_area.x2 + 5;
txt_area.x2 = txt_area.x1 + txt_size.x - 1;
dsc.color = LV_COLOR_BLACK;
dsc.color = lv_color_black();
}
txt_area.y1 = bar->indic_area.y1 + (lv_area_get_height(&bar->indic_area) - txt_size.y) / 2;