mirror of
https://github.com/lvgl/lvgl.git
synced 2026-06-02 17:47:28 +08:00
Run code formatter
This commit is contained in:
@@ -1783,7 +1783,8 @@ void lv_event_send_refresh_recursive(lv_obj_t * obj)
|
|||||||
|
|
||||||
d = lv_disp_get_next(d);
|
d = lv_disp_get_next(d);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
lv_res_t res = lv_event_send_refresh(obj);
|
lv_res_t res = lv_event_send_refresh(obj);
|
||||||
if(res != LV_RES_OK) return; /*If invalid returned do not check the children*/
|
if(res != LV_RES_OK) return; /*If invalid returned do not check the children*/
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ static void draw_pattern(const lv_area_t * coords, const lv_area_t * clip, lv_dr
|
|||||||
#if LV_USE_VALUE_STR
|
#if LV_USE_VALUE_STR
|
||||||
static void draw_value_str(const lv_area_t * coords, const lv_area_t * clip, lv_draw_rect_dsc_t * dsc);
|
static void draw_value_str(const lv_area_t * coords, const lv_area_t * clip, lv_draw_rect_dsc_t * dsc);
|
||||||
#endif
|
#endif
|
||||||
static void draw_full_border(const lv_area_t * area_inner, const lv_area_t * area_outer, const lv_area_t * clip, lv_coord_t radius, lv_color_t color, lv_opa_t opa, lv_blend_mode_t blend_mode);
|
static void draw_full_border(const lv_area_t * area_inner, const lv_area_t * area_outer, const lv_area_t * clip,
|
||||||
|
lv_coord_t radius, lv_color_t color, lv_opa_t opa, lv_blend_mode_t blend_mode);
|
||||||
LV_ATTRIBUTE_FAST_MEM static inline lv_color_t grad_get(lv_draw_rect_dsc_t * dsc, lv_coord_t s, lv_coord_t i);
|
LV_ATTRIBUTE_FAST_MEM static inline lv_color_t grad_get(lv_draw_rect_dsc_t * dsc, lv_coord_t s, lv_coord_t i);
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
@@ -1172,7 +1173,8 @@ static void draw_outline(const lv_area_t * coords, const lv_area_t * clip, lv_dr
|
|||||||
area_outer.y1 -= dsc->outline_width;
|
area_outer.y1 -= dsc->outline_width;
|
||||||
area_outer.y2 += dsc->outline_width;
|
area_outer.y2 += dsc->outline_width;
|
||||||
|
|
||||||
draw_full_border(&area_inner, &area_outer, clip, dsc->radius, dsc->outline_color, dsc->outline_opa, dsc->outline_blend_mode);
|
draw_full_border(&area_inner, &area_outer, clip, dsc->radius, dsc->outline_color, dsc->outline_opa,
|
||||||
|
dsc->outline_blend_mode);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1317,7 +1319,8 @@ static void draw_value_str(const lv_area_t * coords, const lv_area_t * clip, lv_
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void draw_full_border(const lv_area_t * area_inner, const lv_area_t * area_outer, const lv_area_t * clip, lv_coord_t radius, lv_color_t color, lv_opa_t opa, lv_blend_mode_t blend_mode)
|
static void draw_full_border(const lv_area_t * area_inner, const lv_area_t * area_outer, const lv_area_t * clip,
|
||||||
|
lv_coord_t radius, lv_color_t color, lv_opa_t opa, lv_blend_mode_t blend_mode)
|
||||||
{
|
{
|
||||||
uint8_t other_mask_cnt = lv_draw_mask_get_cnt();
|
uint8_t other_mask_cnt = lv_draw_mask_get_cnt();
|
||||||
bool simple_mode = true;
|
bool simple_mode = true;
|
||||||
|
|||||||
@@ -211,7 +211,8 @@ static void basic_init(void)
|
|||||||
lv_style_set_bg_opa(&styles->bg, LV_STATE_DEFAULT, LV_OPA_COVER);
|
lv_style_set_bg_opa(&styles->bg, LV_STATE_DEFAULT, LV_OPA_COVER);
|
||||||
lv_style_set_bg_color(&styles->bg, LV_STATE_DEFAULT, COLOR_BG);
|
lv_style_set_bg_color(&styles->bg, LV_STATE_DEFAULT, COLOR_BG);
|
||||||
lv_style_set_border_color(&styles->bg, LV_STATE_DEFAULT, COLOR_BG_BORDER);
|
lv_style_set_border_color(&styles->bg, LV_STATE_DEFAULT, COLOR_BG_BORDER);
|
||||||
if((theme.flags & LV_THEME_MATERIAL_FLAG_NO_FOCUS) == 0)lv_style_set_border_color(&styles->bg, LV_STATE_FOCUSED, theme.color_primary);
|
if((theme.flags & LV_THEME_MATERIAL_FLAG_NO_FOCUS) == 0)lv_style_set_border_color(&styles->bg, LV_STATE_FOCUSED,
|
||||||
|
theme.color_primary);
|
||||||
lv_style_set_border_color(&styles->bg, LV_STATE_EDITED, theme.color_secondary);
|
lv_style_set_border_color(&styles->bg, LV_STATE_EDITED, theme.color_secondary);
|
||||||
lv_style_set_border_width(&styles->bg, LV_STATE_DEFAULT, BORDER_WIDTH);
|
lv_style_set_border_width(&styles->bg, LV_STATE_DEFAULT, BORDER_WIDTH);
|
||||||
lv_style_set_border_post(&styles->bg, LV_STATE_DEFAULT, true);
|
lv_style_set_border_post(&styles->bg, LV_STATE_DEFAULT, true);
|
||||||
|
|||||||
@@ -706,7 +706,8 @@ static lv_design_res_t lv_btnmatrix_design(lv_obj_t * btnm, const lv_area_t * cl
|
|||||||
if(btn_state == LV_STATE_DEFAULT) {
|
if(btn_state == LV_STATE_DEFAULT) {
|
||||||
draw_rect_dsc_act = &draw_rect_rel_dsc;
|
draw_rect_dsc_act = &draw_rect_rel_dsc;
|
||||||
draw_label_dsc_act = &draw_label_rel_dsc;
|
draw_label_dsc_act = &draw_label_rel_dsc;
|
||||||
} else if(btn_state == LV_STATE_CHECKED) {
|
}
|
||||||
|
else if(btn_state == LV_STATE_CHECKED) {
|
||||||
if(!chk_inited) {
|
if(!chk_inited) {
|
||||||
btnm->state = LV_STATE_CHECKED;
|
btnm->state = LV_STATE_CHECKED;
|
||||||
lv_draw_rect_dsc_init(&draw_rect_chk_dsc);
|
lv_draw_rect_dsc_init(&draw_rect_chk_dsc);
|
||||||
@@ -719,7 +720,8 @@ static lv_design_res_t lv_btnmatrix_design(lv_obj_t * btnm, const lv_area_t * cl
|
|||||||
}
|
}
|
||||||
draw_rect_dsc_act = &draw_rect_chk_dsc;
|
draw_rect_dsc_act = &draw_rect_chk_dsc;
|
||||||
draw_label_dsc_act = &draw_label_chk_dsc;
|
draw_label_dsc_act = &draw_label_chk_dsc;
|
||||||
} else if(btn_state == LV_STATE_CHECKED) {
|
}
|
||||||
|
else if(btn_state == LV_STATE_CHECKED) {
|
||||||
if(!disabled_inited) {
|
if(!disabled_inited) {
|
||||||
btnm->state = LV_STATE_DISABLED;
|
btnm->state = LV_STATE_DISABLED;
|
||||||
lv_draw_rect_dsc_init(&draw_rect_ina_dsc);
|
lv_draw_rect_dsc_init(&draw_rect_ina_dsc);
|
||||||
|
|||||||
@@ -448,8 +448,7 @@ void lv_tabview_set_tab_name(lv_obj_t *tabview, uint16_t id, char *name)
|
|||||||
lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
|
lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
|
||||||
|
|
||||||
/* check for valid tab index */
|
/* check for valid tab index */
|
||||||
if (ext->tab_cnt > id)
|
if(ext->tab_cnt > id) {
|
||||||
{
|
|
||||||
/* reallocate memory for new tab name (use reallocate due to mostly the size didn't change much) */
|
/* reallocate memory for new tab name (use reallocate due to mostly the size didn't change much) */
|
||||||
char * str = lv_mem_realloc((void *)ext->tab_name_ptr[id], strlen(name) + 1);
|
char * str = lv_mem_realloc((void *)ext->tab_name_ptr[id], strlen(name) + 1);
|
||||||
LV_ASSERT_MEM(str);
|
LV_ASSERT_MEM(str);
|
||||||
|
|||||||
Reference in New Issue
Block a user