mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
Run code formatter
This commit is contained in:
parent
2d0480c03d
commit
41e65d9df1
@ -141,7 +141,7 @@ void lv_init(void)
|
||||
#endif
|
||||
|
||||
_lv_ll_init(&LV_GC_ROOT(_lv_obj_style_trans_ll), sizeof(lv_style_trans_t));
|
||||
|
||||
|
||||
_lv_ll_init(&LV_GC_ROOT(_lv_disp_ll), sizeof(lv_disp_t));
|
||||
_lv_ll_init(&LV_GC_ROOT(_lv_indev_ll), sizeof(lv_indev_t));
|
||||
|
||||
@ -172,13 +172,13 @@ void lv_init(void)
|
||||
void lv_deinit(void)
|
||||
{
|
||||
_lv_gc_clear_roots();
|
||||
|
||||
|
||||
lv_disp_set_default(NULL);
|
||||
_lv_mem_deinit();
|
||||
lv_initialized = false;
|
||||
|
||||
|
||||
LV_LOG_INFO("lv_deinit done");
|
||||
|
||||
|
||||
#if LV_USE_LOG
|
||||
lv_log_register_print_cb(NULL);
|
||||
#endif
|
||||
|
@ -1411,8 +1411,8 @@ bool lv_debug_check_obj_valid(const lv_obj_t * obj);
|
||||
|
||||
# ifndef LV_DEBUG_IS_OBJ
|
||||
# define LV_DEBUG_IS_OBJ(obj_p, obj_type) (lv_debug_check_null(obj_p) && \
|
||||
lv_debug_check_obj_valid(obj_p) && \
|
||||
lv_debug_check_obj_type(obj_p, obj_type))
|
||||
lv_debug_check_obj_valid(obj_p) && \
|
||||
lv_debug_check_obj_type(obj_p, obj_type))
|
||||
# endif
|
||||
|
||||
|
||||
|
@ -205,7 +205,8 @@ void _lv_disp_refr_task(lv_task_t * task)
|
||||
if(lv_disp_is_true_double_buf(disp_refr)) {
|
||||
if(disp_refr->driver.set_px_cb) {
|
||||
LV_LOG_WARN("Can't handle 2 screen sized buffers with set_px_cb. Display is not refreshed.");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr);
|
||||
|
||||
/*Flush the content of the VDB*/
|
||||
@ -217,11 +218,11 @@ void _lv_disp_refr_task(lv_task_t * task)
|
||||
while(vdb->flushing);
|
||||
|
||||
lv_color_t * copy_buf = NULL;
|
||||
#if LV_USE_GPU_STM32_DMA2D
|
||||
#if LV_USE_GPU_STM32_DMA2D
|
||||
LV_UNUSED(copy_buf);
|
||||
#else
|
||||
#else
|
||||
copy_buf = _lv_mem_buf_get(disp_refr->driver.hor_res * sizeof(lv_color_t));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
uint8_t * buf_act = (uint8_t *)vdb->buf_act;
|
||||
uint8_t * buf_ina = (uint8_t *)vdb->buf_act == vdb->buf1 ? vdb->buf2 : vdb->buf1;
|
||||
@ -232,12 +233,12 @@ void _lv_disp_refr_task(lv_task_t * task)
|
||||
if(disp_refr->inv_area_joined[a] == 0) {
|
||||
uint32_t start_offs =
|
||||
(hres * disp_refr->inv_areas[a].y1 + disp_refr->inv_areas[a].x1) * sizeof(lv_color_t);
|
||||
#if LV_USE_GPU_STM32_DMA2D
|
||||
#if LV_USE_GPU_STM32_DMA2D
|
||||
lv_gpu_stm32_dma2d_copy((lv_color_t *)(buf_act + start_offs), disp_refr->driver.hor_res,
|
||||
(lv_color_t *)(buf_ina + start_offs), disp_refr->driver.hor_res,
|
||||
lv_area_get_width(&disp_refr->inv_areas[a]),
|
||||
lv_area_get_height(&disp_refr->inv_areas[a]));
|
||||
#else
|
||||
#else
|
||||
|
||||
lv_coord_t y;
|
||||
uint32_t line_length = lv_area_get_width(&disp_refr->inv_areas[a]) * sizeof(lv_color_t);
|
||||
@ -249,7 +250,7 @@ void _lv_disp_refr_task(lv_task_t * task)
|
||||
_lv_memcpy(buf_act + start_offs, copy_buf, line_length);
|
||||
start_offs += hres * sizeof(lv_color_t);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -269,7 +269,7 @@ static void fill_set_px(const lv_area_t * disp_area, lv_color_t * disp_buf, con
|
||||
for(x = draw_area->x1; x <= draw_area->x2; x++) {
|
||||
if(mask_tmp[x]) {
|
||||
disp->driver.set_px_cb(&disp->driver, (void *)disp_buf, disp_w, x, y, color,
|
||||
(uint32_t)((uint32_t)opa * mask_tmp[x]) >> 8);
|
||||
(uint32_t)((uint32_t)opa * mask_tmp[x]) >> 8);
|
||||
}
|
||||
}
|
||||
mask_tmp += draw_area_w;
|
||||
|
@ -458,9 +458,9 @@ LV_ATTRIBUTE_FAST_MEM static void lv_draw_map(const lv_area_t * map_area, const
|
||||
/*Most complicated case: transform or other mask or chroma keyed*/
|
||||
else {
|
||||
/*Build the image and a mask line-by-line*/
|
||||
uint32_t mask_buf_size = lv_area_get_size(&draw_area) > LV_HOR_RES_MAX ? LV_HOR_RES_MAX : lv_area_get_size(&draw_area);
|
||||
lv_color_t * map2 = _lv_mem_buf_get(mask_buf_size * sizeof(lv_color_t));
|
||||
lv_opa_t * mask_buf = _lv_mem_buf_get(mask_buf_size);
|
||||
uint32_t mask_buf_size = lv_area_get_size(&draw_area) > LV_HOR_RES_MAX ? LV_HOR_RES_MAX : lv_area_get_size(&draw_area);
|
||||
lv_color_t * map2 = _lv_mem_buf_get(mask_buf_size * sizeof(lv_color_t));
|
||||
lv_opa_t * mask_buf = _lv_mem_buf_get(mask_buf_size);
|
||||
|
||||
#if LV_USE_IMG_TRANSFORM
|
||||
lv_img_transform_dsc_t trans_dsc;
|
||||
|
@ -758,7 +758,7 @@ static void draw_letter_subpx(lv_coord_t pos_x, lv_coord_t pos_y, lv_font_glyph_
|
||||
}
|
||||
|
||||
/*Go to the next column*/
|
||||
if(col_bit < (int32_t) (8 - bpp)) {
|
||||
if(col_bit < (int32_t)(8 - bpp)) {
|
||||
col_bit += bpp;
|
||||
bitmask = bitmask >> bpp;
|
||||
}
|
||||
|
@ -1047,7 +1047,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_shadow(const lv_area_t * coords, const lv
|
||||
if(mask_res == LV_DRAW_MASK_RES_FULL_COVER) mask_res = LV_DRAW_MASK_RES_CHANGED;
|
||||
|
||||
_lv_blend_fill(clip, &fa, dsc->shadow_color, mask_buf,
|
||||
mask_res, LV_OPA_COVER, dsc->shadow_blend_mode);
|
||||
mask_res, LV_OPA_COVER, dsc->shadow_blend_mode);
|
||||
fa.y1++;
|
||||
fa.y2++;
|
||||
}
|
||||
|
@ -456,9 +456,12 @@ LV_ATTRIBUTE_FAST_MEM static inline lv_color_t lv_color_mix(lv_color_t c1, lv_co
|
||||
lv_color_t ret;
|
||||
#if LV_COLOR_DEPTH != 1
|
||||
/*LV_COLOR_DEPTH == 8, 16 or 32*/
|
||||
LV_COLOR_SET_R(ret, LV_MATH_UDIV255((uint16_t) LV_COLOR_GET_R(c1) * mix + LV_COLOR_GET_R(c2) * (255 - mix) + LV_COLOR_MIX_ROUND_OFS));
|
||||
LV_COLOR_SET_G(ret, LV_MATH_UDIV255((uint16_t) LV_COLOR_GET_G(c1) * mix + LV_COLOR_GET_G(c2) * (255 - mix) + LV_COLOR_MIX_ROUND_OFS));
|
||||
LV_COLOR_SET_B(ret, LV_MATH_UDIV255((uint16_t) LV_COLOR_GET_B(c1) * mix + LV_COLOR_GET_B(c2) * (255 - mix) + LV_COLOR_MIX_ROUND_OFS));
|
||||
LV_COLOR_SET_R(ret, LV_MATH_UDIV255((uint16_t) LV_COLOR_GET_R(c1) * mix + LV_COLOR_GET_R(c2) *
|
||||
(255 - mix) + LV_COLOR_MIX_ROUND_OFS));
|
||||
LV_COLOR_SET_G(ret, LV_MATH_UDIV255((uint16_t) LV_COLOR_GET_G(c1) * mix + LV_COLOR_GET_G(c2) *
|
||||
(255 - mix) + LV_COLOR_MIX_ROUND_OFS));
|
||||
LV_COLOR_SET_B(ret, LV_MATH_UDIV255((uint16_t) LV_COLOR_GET_B(c1) * mix + LV_COLOR_GET_B(c2) *
|
||||
(255 - mix) + LV_COLOR_MIX_ROUND_OFS));
|
||||
LV_COLOR_SET_A(ret, 0xFF);
|
||||
#else
|
||||
/*LV_COLOR_DEPTH == 1*/
|
||||
|
@ -26,7 +26,7 @@
|
||||
**********************/
|
||||
typedef struct {
|
||||
lv_style_t opa_cover;
|
||||
}theme_styles_t;
|
||||
} theme_styles_t;
|
||||
|
||||
/**********************
|
||||
* STATIC PROTOTYPES
|
||||
|
@ -73,8 +73,7 @@
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
lv_style_t scr;
|
||||
lv_style_t bg;
|
||||
lv_style_t bg_click;
|
||||
@ -83,96 +82,96 @@ typedef struct
|
||||
lv_style_t pad_inner;
|
||||
lv_style_t pad_small;
|
||||
|
||||
#if LV_USE_ARC
|
||||
lv_style_t arc_indic;
|
||||
lv_style_t arc_bg;
|
||||
#endif
|
||||
#if LV_USE_ARC
|
||||
lv_style_t arc_indic;
|
||||
lv_style_t arc_bg;
|
||||
#endif
|
||||
|
||||
#if LV_USE_BAR
|
||||
lv_style_t bar_bg;
|
||||
lv_style_t bar_indic;
|
||||
#endif
|
||||
#if LV_USE_BAR
|
||||
lv_style_t bar_bg;
|
||||
lv_style_t bar_indic;
|
||||
#endif
|
||||
|
||||
#if LV_USE_CALENDAR
|
||||
lv_style_t calendar_date_nums, calendar_header, calendar_daynames;
|
||||
#endif
|
||||
#if LV_USE_CALENDAR
|
||||
lv_style_t calendar_date_nums, calendar_header, calendar_daynames;
|
||||
#endif
|
||||
|
||||
#if LV_USE_CPICKER
|
||||
lv_style_t cpicker_bg, cpicker_indic;
|
||||
#endif
|
||||
#if LV_USE_CPICKER
|
||||
lv_style_t cpicker_bg, cpicker_indic;
|
||||
#endif
|
||||
|
||||
#if LV_USE_CHART
|
||||
lv_style_t chart_bg, chart_series_bg, chart_series;
|
||||
#endif
|
||||
#if LV_USE_CHART
|
||||
lv_style_t chart_bg, chart_series_bg, chart_series;
|
||||
#endif
|
||||
|
||||
#if LV_USE_CHECKBOX
|
||||
lv_style_t cb_bg, cb_bullet;
|
||||
#endif
|
||||
#if LV_USE_CHECKBOX
|
||||
lv_style_t cb_bg, cb_bullet;
|
||||
#endif
|
||||
|
||||
#if LV_USE_DROPDOWN
|
||||
lv_style_t ddlist_page, ddlist_sel;
|
||||
#endif
|
||||
#if LV_USE_DROPDOWN
|
||||
lv_style_t ddlist_page, ddlist_sel;
|
||||
#endif
|
||||
|
||||
#if LV_USE_GAUGE
|
||||
lv_style_t gauge_main, gauge_strong, gauge_needle;
|
||||
#endif
|
||||
#if LV_USE_GAUGE
|
||||
lv_style_t gauge_main, gauge_strong, gauge_needle;
|
||||
#endif
|
||||
|
||||
#if LV_USE_KEYBOARD
|
||||
lv_style_t kb_bg;
|
||||
#endif
|
||||
#if LV_USE_KEYBOARD
|
||||
lv_style_t kb_bg;
|
||||
#endif
|
||||
|
||||
#if LV_USE_LED
|
||||
lv_style_t led;
|
||||
#endif
|
||||
#if LV_USE_LED
|
||||
lv_style_t led;
|
||||
#endif
|
||||
|
||||
#if LV_USE_LINEMETER
|
||||
lv_style_t lmeter;
|
||||
#endif
|
||||
#if LV_USE_LINEMETER
|
||||
lv_style_t lmeter;
|
||||
#endif
|
||||
|
||||
#if LV_USE_LIST
|
||||
lv_style_t list_bg, list_btn;
|
||||
#endif
|
||||
#if LV_USE_LIST
|
||||
lv_style_t list_bg, list_btn;
|
||||
#endif
|
||||
|
||||
#if LV_USE_MSGBOX
|
||||
lv_style_t mbox_bg;
|
||||
#endif
|
||||
#if LV_USE_MSGBOX
|
||||
lv_style_t mbox_bg;
|
||||
#endif
|
||||
|
||||
#if LV_USE_PAGE
|
||||
lv_style_t sb;
|
||||
#if LV_USE_ANIMATION
|
||||
lv_style_t edge_flash;
|
||||
#endif
|
||||
#endif
|
||||
#if LV_USE_PAGE
|
||||
lv_style_t sb;
|
||||
#if LV_USE_ANIMATION
|
||||
lv_style_t edge_flash;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if LV_USE_ROLLER
|
||||
lv_style_t roller_bg, roller_sel;
|
||||
#endif
|
||||
#if LV_USE_ROLLER
|
||||
lv_style_t roller_bg, roller_sel;
|
||||
#endif
|
||||
|
||||
#if LV_USE_SLIDER
|
||||
lv_style_t slider_knob, slider_bg;
|
||||
#endif
|
||||
#if LV_USE_SLIDER
|
||||
lv_style_t slider_knob, slider_bg;
|
||||
#endif
|
||||
|
||||
#if LV_USE_SPINBOX
|
||||
lv_style_t spinbox_cursor;
|
||||
#endif
|
||||
#if LV_USE_SPINBOX
|
||||
lv_style_t spinbox_cursor;
|
||||
#endif
|
||||
|
||||
#if LV_USE_SWITCH
|
||||
lv_style_t sw_knob;
|
||||
#endif
|
||||
#if LV_USE_SWITCH
|
||||
lv_style_t sw_knob;
|
||||
#endif
|
||||
|
||||
#if LV_USE_TABLE
|
||||
lv_style_t table_cell;
|
||||
#endif
|
||||
#if LV_USE_TABLE
|
||||
lv_style_t table_cell;
|
||||
#endif
|
||||
|
||||
#if LV_USE_TABVIEW || LV_USE_WIN
|
||||
lv_style_t tabview_btns, tabview_btns_bg, tabview_indic, tabview_page_scrl;
|
||||
#endif
|
||||
#if LV_USE_TABVIEW || LV_USE_WIN
|
||||
lv_style_t tabview_btns, tabview_btns_bg, tabview_indic, tabview_page_scrl;
|
||||
#endif
|
||||
|
||||
#if LV_USE_TEXTAREA
|
||||
lv_style_t ta_cursor, ta_placeholder;
|
||||
#endif
|
||||
#if LV_USE_TEXTAREA
|
||||
lv_style_t ta_cursor, ta_placeholder;
|
||||
#endif
|
||||
|
||||
}theme_styles_t;
|
||||
} theme_styles_t;
|
||||
|
||||
/**********************
|
||||
* STATIC PROTOTYPES
|
||||
@ -246,7 +245,7 @@ static void basic_init(void)
|
||||
lv_style_set_bg_color(&styles->bg_click, LV_STATE_DISABLED, COLOR_BG_DIS);
|
||||
lv_style_set_border_width(&styles->bg_click, LV_STATE_CHECKED, 0);
|
||||
lv_style_set_border_color(&styles->bg_click, LV_STATE_FOCUSED | LV_STATE_PRESSED, lv_color_darken(theme.color_primary,
|
||||
LV_OPA_20));
|
||||
LV_OPA_20));
|
||||
lv_style_set_border_color(&styles->bg_click, LV_STATE_PRESSED, COLOR_BG_BORDER_PR);
|
||||
lv_style_set_border_color(&styles->bg_click, LV_STATE_CHECKED, COLOR_BG_BORDER_CHK);
|
||||
lv_style_set_border_color(&styles->bg_click, LV_STATE_PRESSED | LV_STATE_CHECKED, COLOR_BG_BORDER_CHK_PR);
|
||||
@ -546,21 +545,24 @@ static void calendar_init(void)
|
||||
lv_style_set_text_color(&styles->calendar_header, LV_STATE_PRESSED, IS_LIGHT ? lv_color_hex(0x888888) : LV_COLOR_WHITE);
|
||||
|
||||
style_init_reset(&styles->calendar_daynames);
|
||||
lv_style_set_text_color(&styles->calendar_daynames, LV_STATE_DEFAULT, IS_LIGHT ? lv_color_hex(0x31404f) : lv_color_hex3(0xeee));
|
||||
lv_style_set_text_color(&styles->calendar_daynames, LV_STATE_DEFAULT,
|
||||
IS_LIGHT ? lv_color_hex(0x31404f) : lv_color_hex3(0xeee));
|
||||
lv_style_set_pad_left(&styles->calendar_daynames, LV_STATE_DEFAULT, PAD_DEF);
|
||||
lv_style_set_pad_right(&styles->calendar_daynames, LV_STATE_DEFAULT, PAD_DEF);
|
||||
lv_style_set_pad_bottom(&styles->calendar_daynames, LV_STATE_DEFAULT, PAD_DEF);
|
||||
|
||||
style_init_reset(&styles->calendar_date_nums);
|
||||
lv_style_set_radius(&styles->calendar_date_nums, LV_STATE_DEFAULT, LV_DPX(4));
|
||||
lv_style_set_text_color(&styles->calendar_date_nums, LV_STATE_CHECKED, IS_LIGHT ? lv_color_hex(0x31404f) : LV_COLOR_WHITE);
|
||||
lv_style_set_text_color(&styles->calendar_date_nums, LV_STATE_CHECKED,
|
||||
IS_LIGHT ? lv_color_hex(0x31404f) : LV_COLOR_WHITE);
|
||||
|
||||
lv_style_set_bg_opa(&styles->calendar_date_nums, LV_STATE_CHECKED, IS_LIGHT ? LV_OPA_20 : LV_OPA_40);
|
||||
lv_style_set_bg_opa(&styles->calendar_date_nums, LV_STATE_PRESSED, LV_OPA_20);
|
||||
lv_style_set_bg_opa(&styles->calendar_date_nums, LV_STATE_FOCUSED, LV_OPA_COVER);
|
||||
lv_style_set_text_color(&styles->calendar_date_nums, LV_STATE_FOCUSED, LV_COLOR_WHITE);
|
||||
lv_style_set_bg_color(&styles->calendar_date_nums, LV_STATE_FOCUSED, theme.color_primary);
|
||||
lv_style_set_bg_color(&styles->calendar_date_nums, LV_STATE_DEFAULT, IS_LIGHT ? lv_color_hex(0x666666) : LV_COLOR_WHITE);
|
||||
lv_style_set_bg_color(&styles->calendar_date_nums, LV_STATE_DEFAULT,
|
||||
IS_LIGHT ? lv_color_hex(0x666666) : LV_COLOR_WHITE);
|
||||
lv_style_set_bg_color(&styles->calendar_date_nums, LV_STATE_CHECKED, theme.color_primary);
|
||||
lv_style_set_border_width(&styles->calendar_date_nums, LV_STATE_CHECKED, 2);
|
||||
lv_style_set_border_side(&styles->calendar_date_nums, LV_STATE_CHECKED, LV_BORDER_SIDE_LEFT);
|
||||
@ -684,7 +686,8 @@ static void textarea_init(void)
|
||||
lv_style_set_border_side(&styles->ta_cursor, LV_STATE_DEFAULT, LV_BORDER_SIDE_LEFT);
|
||||
|
||||
style_init_reset(&styles->ta_placeholder);
|
||||
lv_style_set_text_color(&styles->ta_placeholder, LV_STATE_DEFAULT, IS_LIGHT ? COLOR_BG_TEXT_DIS : lv_color_hex(0xa1adbd));
|
||||
lv_style_set_text_color(&styles->ta_placeholder, LV_STATE_DEFAULT,
|
||||
IS_LIGHT ? COLOR_BG_TEXT_DIS : lv_color_hex(0xa1adbd));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -24,21 +24,20 @@
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
lv_style_t scr;
|
||||
lv_style_t bg;
|
||||
lv_style_t clip_corner;
|
||||
lv_style_t btn;
|
||||
lv_style_t round;
|
||||
lv_style_t no_radius;
|
||||
lv_style_t fg_color;
|
||||
lv_style_t border_none;
|
||||
lv_style_t big_line_space; /*In roller or dropdownlist*/
|
||||
lv_style_t pad_none;
|
||||
lv_style_t pad_normal;
|
||||
lv_style_t pad_small;
|
||||
lv_style_t pad_inner;
|
||||
typedef struct {
|
||||
lv_style_t scr;
|
||||
lv_style_t bg;
|
||||
lv_style_t clip_corner;
|
||||
lv_style_t btn;
|
||||
lv_style_t round;
|
||||
lv_style_t no_radius;
|
||||
lv_style_t fg_color;
|
||||
lv_style_t border_none;
|
||||
lv_style_t big_line_space; /*In roller or dropdownlist*/
|
||||
lv_style_t pad_none;
|
||||
lv_style_t pad_normal;
|
||||
lv_style_t pad_small;
|
||||
lv_style_t pad_inner;
|
||||
|
||||
#if LV_USE_ARC
|
||||
lv_style_t arc_bg, arc_indic;
|
||||
@ -79,7 +78,7 @@ lv_style_t pad_inner;
|
||||
#if LV_USE_TABVIEW
|
||||
lv_style_t tab_bg;
|
||||
#endif
|
||||
}theme_styles_t;
|
||||
} theme_styles_t;
|
||||
|
||||
/**********************
|
||||
* STATIC PROTOTYPES
|
||||
|
@ -80,7 +80,8 @@ static void basic_init(void)
|
||||
style_init_reset(&styles->btn);
|
||||
lv_style_set_bg_color(&styles->btn, LV_STATE_PRESSED, lv_color_hex3(0xccc));
|
||||
lv_style_set_bg_color(&styles->btn, LV_STATE_CHECKED, theme.color_primary);
|
||||
lv_style_set_bg_color(&styles->btn, LV_STATE_CHECKED | LV_STATE_PRESSED, lv_color_darken(theme.color_primary, LV_OPA_30));
|
||||
lv_style_set_bg_color(&styles->btn, LV_STATE_CHECKED | LV_STATE_PRESSED, lv_color_darken(theme.color_primary,
|
||||
LV_OPA_30));
|
||||
lv_style_set_bg_color(&styles->btn, LV_STATE_DISABLED, LV_COLOR_SILVER);
|
||||
lv_style_set_text_color(&styles->btn, LV_STATE_DISABLED, LV_COLOR_GRAY);
|
||||
lv_style_set_image_recolor(&styles->btn, LV_STATE_DISABLED, LV_COLOR_GRAY);
|
||||
|
@ -202,7 +202,8 @@ lv_btn_state_t lv_btn_get_state(const lv_obj_t * btn)
|
||||
if(obj_state & LV_STATE_CHECKED) {
|
||||
if(obj_state & LV_STATE_PRESSED) return LV_BTN_STATE_CHECKED_PRESSED;
|
||||
else return LV_BTN_STATE_CHECKED_RELEASED;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if(obj_state & LV_STATE_PRESSED) return LV_BTN_STATE_PRESSED;
|
||||
else return LV_BTN_STATE_RELEASED;
|
||||
}
|
||||
|
@ -587,7 +587,8 @@ static lv_design_res_t lv_img_design(lv_obj_t * img, const lv_area_t * clip_area
|
||||
|
||||
if(zoom_final != LV_IMG_ZOOM_NONE) {
|
||||
if(_lv_area_is_in(clip_area, &img->coords, 0) == false) return LV_DESIGN_RES_NOT_COVER;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
lv_area_t a;
|
||||
_lv_img_buf_get_transformed_area(&a, lv_obj_get_width(img), lv_obj_get_height(img), 0, zoom_final, &ext->pivot);
|
||||
a.x1 += img->coords.x1;
|
||||
|
@ -785,7 +785,8 @@ uint32_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos)
|
||||
uint32_t cid = _lv_txt_encoded_get_char_id(bidi_txt, i);
|
||||
if(txt[line_start + cid] == '\0') {
|
||||
logical_pos = i;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
bool is_rtl;
|
||||
logical_pos = _lv_bidi_get_logical_pos(&txt[line_start], NULL,
|
||||
txt_len, lv_obj_get_base_dir(label), cid, &is_rtl);
|
||||
|
@ -171,7 +171,7 @@ void lv_page_set_edge_flash(lv_obj_t * page, bool en);
|
||||
* @param bottom bottom fit policy from `lv_fit_t`
|
||||
*/
|
||||
static inline void lv_page_set_scrollable_fit4(lv_obj_t * page, lv_fit_t left, lv_fit_t right, lv_fit_t top,
|
||||
lv_fit_t bottom)
|
||||
lv_fit_t bottom)
|
||||
{
|
||||
lv_cont_set_fit4(lv_page_get_scrollable(page), left, right, top, bottom);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user