diff --git a/src/lv_draw/lv_draw_blend.c b/src/lv_draw/lv_draw_blend.c index 1a0c0099b..7df70c477 100644 --- a/src/lv_draw/lv_draw_blend.c +++ b/src/lv_draw/lv_draw_blend.c @@ -51,7 +51,7 @@ static void map_blended(const lv_area_t * disp_area, lv_color_t * disp_buf, con const lv_area_t * map_area, const lv_color_t * map_buf, lv_opa_t opa, const lv_opa_t * mask, lv_draw_mask_res_t mask_res, lv_blend_mode_t mode); -static inline lv_color_t color_blend_true_color_additive(lv_color_t bg, lv_color_t fg, lv_opa_t opa); +static inline lv_color_t color_blend_true_color_additive(lv_color_t fg, lv_color_t bg, lv_opa_t opa); static inline lv_color_t color_blend_true_color_subtractive(lv_color_t fg, lv_color_t bg, lv_opa_t opa); /********************** diff --git a/src/lv_misc/lv_task.c b/src/lv_misc/lv_task.c index ffe996a81..8a7bffca8 100644 --- a/src/lv_misc/lv_task.c +++ b/src/lv_misc/lv_task.c @@ -65,6 +65,8 @@ void lv_task_core_init(void) */ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void) { + + LV_LOG_TRACE("lv_task_handler started"); /*Avoid concurrent running of the task handler*/ diff --git a/src/lv_objx/lv_cpicker.c b/src/lv_objx/lv_cpicker.c index cbd718322..21b055439 100644 --- a/src/lv_objx/lv_cpicker.c +++ b/src/lv_objx/lv_cpicker.c @@ -384,18 +384,20 @@ const lv_style_t * lv_cpicker_get_style(const lv_obj_t * cpicker, lv_cpicker_sty LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME); lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker); + const lv_style_t * style; switch(type) { case LV_CPICKER_STYLE_MAIN: - return lv_obj_get_style(cpicker); + style = lv_obj_get_style(cpicker); + break; case LV_CPICKER_STYLE_INDICATOR: - return ext->indic.style; + style = ext->indic.style; + break; default: - return NULL; + style = NULL; } - /*To avoid warning*/ - return NULL; + return style; } /** diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 87c92a369..02f56b552 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -456,16 +456,23 @@ const lv_style_t * lv_ddlist_get_style(const lv_obj_t * ddlist, lv_ddlist_style_ LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME); lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); + const lv_style_t * style; switch(type) { - case LV_DDLIST_STYLE_BG: return lv_page_get_style(ddlist, LV_PAGE_STYLE_BG); - case LV_DDLIST_STYLE_SB: return lv_page_get_style(ddlist, LV_PAGE_STYLE_SB); - case LV_DDLIST_STYLE_SEL: return ext->sel_style; - default: return NULL; + case LV_DDLIST_STYLE_BG: + style = lv_page_get_style(ddlist, LV_PAGE_STYLE_BG); + break; + case LV_DDLIST_STYLE_SB: + style = lv_page_get_style(ddlist, LV_PAGE_STYLE_SB); + break; + case LV_DDLIST_STYLE_SEL: + style = ext->sel_style; + break; + default: + style = NULL; } - /*To avoid warning*/ - return NULL; + return style; } lv_label_align_t lv_ddlist_get_align(const lv_obj_t * ddlist) diff --git a/src/lv_objx/lv_line.c b/src/lv_objx/lv_line.c index 0a71b18f2..4a963c546 100644 --- a/src/lv_objx/lv_line.c +++ b/src/lv_objx/lv_line.c @@ -246,7 +246,7 @@ static lv_design_res_t lv_line_design(lv_obj_t * line, const lv_area_t * clip_ar } lv_area_t circle_area; lv_coord_t r = (style->line.width >> 1); - lv_coord_t r_corr = style->line.width & 1 ? 0 : 1; + lv_coord_t r_corr = (style->line.width & 1) ? 0 : 1; /*Read all points and draw the lines*/ for(i = 0; i < ext->point_num - 1; i++) { diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index 01b0e6ba4..cc15880b8 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -310,14 +310,19 @@ const lv_style_t * lv_roller_get_style(const lv_obj_t * roller, lv_roller_style_ { LV_ASSERT_OBJ(roller, LV_OBJX_NAME); + const lv_style_t * style; switch(type) { - case LV_ROLLER_STYLE_BG: return lv_obj_get_style(roller); - case LV_ROLLER_STYLE_SEL: return lv_ddlist_get_style(roller, LV_DDLIST_STYLE_SEL); - default: return NULL; + case LV_ROLLER_STYLE_BG: + style = lv_obj_get_style(roller); + break; + case LV_ROLLER_STYLE_SEL: + style = lv_ddlist_get_style(roller, LV_DDLIST_STYLE_SEL); + break; + default: + style = NULL; } - /*To avoid warning*/ - return NULL; + return style; } /********************** diff --git a/src/lv_themes/lv_theme_material.c b/src/lv_themes/lv_theme_material.c index deceac946..a5694bfde 100644 --- a/src/lv_themes/lv_theme_material.c +++ b/src/lv_themes/lv_theme_material.c @@ -681,7 +681,6 @@ static void tabview_init(void) indic.body.radius = 0; indic.body.border.width = 0; indic.body.padding.inner = LV_DPI / 20; - indic.body.padding.inner = LV_DPI / 20; lv_style_copy(&btn_bg, &def); btn_bg.body.main_color = lv_color_hex3(0xccc);