mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
solve warnings listed in #1292
This commit is contained in:
parent
64df282c81
commit
6e97c07588
@ -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_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);
|
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);
|
static inline lv_color_t color_blend_true_color_subtractive(lv_color_t fg, lv_color_t bg, lv_opa_t opa);
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
|
@ -65,6 +65,8 @@ void lv_task_core_init(void)
|
|||||||
*/
|
*/
|
||||||
LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void)
|
LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
LV_LOG_TRACE("lv_task_handler started");
|
LV_LOG_TRACE("lv_task_handler started");
|
||||||
|
|
||||||
/*Avoid concurrent running of the task handler*/
|
/*Avoid concurrent running of the task handler*/
|
||||||
|
@ -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_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
|
||||||
|
|
||||||
lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
|
lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
|
||||||
|
const lv_style_t * style;
|
||||||
|
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case LV_CPICKER_STYLE_MAIN:
|
case LV_CPICKER_STYLE_MAIN:
|
||||||
return lv_obj_get_style(cpicker);
|
style = lv_obj_get_style(cpicker);
|
||||||
|
break;
|
||||||
case LV_CPICKER_STYLE_INDICATOR:
|
case LV_CPICKER_STYLE_INDICATOR:
|
||||||
return ext->indic.style;
|
style = ext->indic.style;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return NULL;
|
style = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*To avoid warning*/
|
return style;
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
|
||||||
|
|
||||||
lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
|
lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
|
||||||
|
const lv_style_t * style;
|
||||||
|
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case LV_DDLIST_STYLE_BG: return lv_page_get_style(ddlist, LV_PAGE_STYLE_BG);
|
case LV_DDLIST_STYLE_BG:
|
||||||
case LV_DDLIST_STYLE_SB: return lv_page_get_style(ddlist, LV_PAGE_STYLE_SB);
|
style = lv_page_get_style(ddlist, LV_PAGE_STYLE_BG);
|
||||||
case LV_DDLIST_STYLE_SEL: return ext->sel_style;
|
break;
|
||||||
default: return NULL;
|
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 style;
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lv_label_align_t lv_ddlist_get_align(const lv_obj_t * ddlist)
|
lv_label_align_t lv_ddlist_get_align(const lv_obj_t * ddlist)
|
||||||
|
@ -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_area_t circle_area;
|
||||||
lv_coord_t r = (style->line.width >> 1);
|
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*/
|
/*Read all points and draw the lines*/
|
||||||
for(i = 0; i < ext->point_num - 1; i++) {
|
for(i = 0; i < ext->point_num - 1; i++) {
|
||||||
|
@ -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);
|
LV_ASSERT_OBJ(roller, LV_OBJX_NAME);
|
||||||
|
|
||||||
|
const lv_style_t * style;
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case LV_ROLLER_STYLE_BG: return lv_obj_get_style(roller);
|
case LV_ROLLER_STYLE_BG:
|
||||||
case LV_ROLLER_STYLE_SEL: return lv_ddlist_get_style(roller, LV_DDLIST_STYLE_SEL);
|
style = lv_obj_get_style(roller);
|
||||||
default: return NULL;
|
break;
|
||||||
|
case LV_ROLLER_STYLE_SEL:
|
||||||
|
style = lv_ddlist_get_style(roller, LV_DDLIST_STYLE_SEL);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
style = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*To avoid warning*/
|
return style;
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
|
@ -681,7 +681,6 @@ static void tabview_init(void)
|
|||||||
indic.body.radius = 0;
|
indic.body.radius = 0;
|
||||||
indic.body.border.width = 0;
|
indic.body.border.width = 0;
|
||||||
indic.body.padding.inner = LV_DPI / 20;
|
indic.body.padding.inner = LV_DPI / 20;
|
||||||
indic.body.padding.inner = LV_DPI / 20;
|
|
||||||
|
|
||||||
lv_style_copy(&btn_bg, &def);
|
lv_style_copy(&btn_bg, &def);
|
||||||
btn_bg.body.main_color = lv_color_hex3(0xccc);
|
btn_bg.body.main_color = lv_color_hex3(0xccc);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user