remove lv_label_body_draw, can be replaced by style
This commit is contained in:
@@ -737,8 +737,7 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h)
|
||||
|
||||
/*Tell the children the parent's size has changed*/
|
||||
lv_obj_t * i;
|
||||
LV_LL_READ(obj->child_ll, i)
|
||||
{
|
||||
LV_LL_READ(obj->child_ll, i) {
|
||||
i->signal_cb(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ static void style_animation_common_end_cb(lv_anim_t * a);
|
||||
/**********************
|
||||
* GLOABAL VARIABLES
|
||||
**********************/
|
||||
lv_style_t lv_style_transp_tight;
|
||||
//lv_style_t lv_style_transp_tight;
|
||||
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
@@ -60,16 +60,16 @@ lv_style_t lv_style_transp_tight;
|
||||
|
||||
void lv_style_built_in_init(void)
|
||||
{
|
||||
lv_style_init(&lv_style_transp_tight);
|
||||
lv_style_set_opa(&lv_style_transp_tight, LV_STYLE_BG_OPA, LV_OPA_TRANSP);
|
||||
lv_style_set_opa(&lv_style_transp_tight, LV_STYLE_BORDER_OPA, LV_OPA_TRANSP);
|
||||
lv_style_set_opa(&lv_style_transp_tight, LV_STYLE_SHADOW_OPA, LV_OPA_TRANSP);
|
||||
lv_style_set_opa(&lv_style_transp_tight, LV_STYLE_PATTERN_OPA, LV_OPA_TRANSP);
|
||||
lv_style_set_int(&lv_style_transp_tight, LV_STYLE_PAD_LEFT, 0);
|
||||
lv_style_set_int(&lv_style_transp_tight, LV_STYLE_PAD_RIGHT, 0);
|
||||
lv_style_set_int(&lv_style_transp_tight, LV_STYLE_PAD_TOP, 0);
|
||||
lv_style_set_int(&lv_style_transp_tight, LV_STYLE_PAD_BOTTOM, 0);
|
||||
lv_style_set_int(&lv_style_transp_tight, LV_STYLE_PAD_INNER, 0);
|
||||
// lv_style_init(&lv_style_transp_tight);
|
||||
// lv_style_set_opa(&lv_style_transp_tight, LV_STYLE_BG_OPA, LV_OPA_TRANSP);
|
||||
// lv_style_set_opa(&lv_style_transp_tight, LV_STYLE_BORDER_OPA, LV_OPA_TRANSP);
|
||||
// lv_style_set_opa(&lv_style_transp_tight, LV_STYLE_SHADOW_OPA, LV_OPA_TRANSP);
|
||||
// lv_style_set_opa(&lv_style_transp_tight, LV_STYLE_PATTERN_OPA, LV_OPA_TRANSP);
|
||||
// lv_style_set_int(&lv_style_transp_tight, LV_STYLE_PAD_LEFT, 0);
|
||||
// lv_style_set_int(&lv_style_transp_tight, LV_STYLE_PAD_RIGHT, 0);
|
||||
// lv_style_set_int(&lv_style_transp_tight, LV_STYLE_PAD_TOP, 0);
|
||||
// lv_style_set_int(&lv_style_transp_tight, LV_STYLE_PAD_BOTTOM, 0);
|
||||
// lv_style_set_int(&lv_style_transp_tight, LV_STYLE_PAD_INNER, 0);
|
||||
}
|
||||
|
||||
void lv_style_init(lv_style_t * style)
|
||||
|
||||
@@ -348,7 +348,7 @@ static inline void lv_style_anim_create(lv_anim_t * a)
|
||||
/*************************
|
||||
* GLOBAL VARIABLES
|
||||
*************************/
|
||||
extern lv_style_t lv_style_transp_tight;
|
||||
//extern lv_style_t lv_style_transp_tight;
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
|
||||
@@ -140,8 +140,8 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver)
|
||||
disp->act_scr = lv_obj_create(NULL, NULL); /*Create a default screen on the display*/
|
||||
disp->top_layer = lv_obj_create(NULL, NULL); /*Create top layer on the display*/
|
||||
disp->sys_layer = lv_obj_create(NULL, NULL); /*Create sys layer on the display*/
|
||||
lv_obj_add_style_class(disp->top_layer, LV_OBJ_PART_MAIN, _t(SCR_TRANSP));
|
||||
lv_obj_add_style_class(disp->sys_layer, LV_OBJ_PART_MAIN, _t(SCR_TRANSP));
|
||||
lv_obj_reset_style(disp->top_layer, LV_OBJ_PART_MAIN);
|
||||
lv_obj_reset_style(disp->sys_layer, LV_OBJ_PART_MAIN);
|
||||
|
||||
lv_obj_invalidate(disp->act_scr);
|
||||
|
||||
|
||||
@@ -336,6 +336,20 @@ void lv_mem_defrag(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
void lv_mem_test(void)
|
||||
{
|
||||
lv_mem_ent_t * e;
|
||||
e = ent_get_next(NULL);
|
||||
while(e) {
|
||||
if(e->header.s.d_size > 200000) {
|
||||
printf("mem err\n");
|
||||
while(1);
|
||||
}
|
||||
e = ent_get_next(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Give information about the work memory of dynamic allocation
|
||||
* @param mon_p pointer to a dm_mon_p variable,
|
||||
|
||||
@@ -97,6 +97,8 @@ void * lv_mem_realloc(void * data_p, size_t new_size);
|
||||
*/
|
||||
void lv_mem_defrag(void);
|
||||
|
||||
void lv_mem_test(void);
|
||||
|
||||
/**
|
||||
* Give information about the work memory of dynamic allocation
|
||||
* @param mon_p pointer to a dm_mon_p variable,
|
||||
|
||||
@@ -622,7 +622,6 @@ static lv_design_res_t lv_btnm_design(lv_obj_t * btnm, const lv_area_t * clip_ar
|
||||
|
||||
|
||||
/*The state changes without re-caching the styles, disable the use of cache*/
|
||||
// btnm->style_dsc.cache.enabled = 0;
|
||||
uint8_t state_ori = btnm->state;
|
||||
btnm->state = 0;
|
||||
lv_draw_rect_dsc_init(&draw_rect_rel_dsc);
|
||||
@@ -643,7 +642,6 @@ static lv_design_res_t lv_btnm_design(lv_obj_t * btnm, const lv_area_t * clip_ar
|
||||
lv_obj_init_draw_label_dsc(btnm, LV_BTNM_PART_BTN, &draw_label_ina_dsc);
|
||||
|
||||
btnm->state = state_ori;
|
||||
// btnm->style_dsc.cache.enabled = 1;
|
||||
|
||||
lv_style_int_t padding_top = lv_obj_get_style_int(btnm, LV_BTNM_PART_BG, LV_STYLE_PAD_TOP);
|
||||
lv_style_int_t padding_bottom = lv_obj_get_style_int(btnm, LV_BTNM_PART_BG, LV_STYLE_PAD_BOTTOM);
|
||||
|
||||
@@ -96,7 +96,6 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
ext->text = NULL;
|
||||
ext->static_txt = 0;
|
||||
ext->recolor = 0;
|
||||
ext->body_draw = 0;
|
||||
ext->align = LV_LABEL_ALIGN_AUTO;
|
||||
ext->dot_end = LV_LABEL_DOT_END_INV;
|
||||
ext->long_mode = LV_LABEL_LONG_EXPAND;
|
||||
@@ -136,7 +135,6 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
lv_label_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
|
||||
lv_label_set_long_mode(new_label, lv_label_get_long_mode(copy));
|
||||
lv_label_set_recolor(new_label, lv_label_get_recolor(copy));
|
||||
lv_label_set_body_draw(new_label, lv_label_get_body_draw(copy));
|
||||
lv_label_set_align(new_label, lv_label_get_align(copy));
|
||||
if(copy_ext->static_txt == 0)
|
||||
lv_label_set_text(new_label, lv_label_get_text(copy));
|
||||
@@ -197,6 +195,7 @@ void lv_label_set_text(lv_obj_t * label, const char * text)
|
||||
if(ext->text == text) {
|
||||
/*If set its own text then reallocate it (maybe its size changed)*/
|
||||
ext->text = lv_mem_realloc(ext->text, strlen(ext->text) + 1);
|
||||
|
||||
LV_ASSERT_MEM(ext->text);
|
||||
if(ext->text == NULL) return;
|
||||
} else {
|
||||
@@ -208,6 +207,7 @@ void lv_label_set_text(lv_obj_t * label, const char * text)
|
||||
}
|
||||
|
||||
ext->text = lv_mem_alloc(len);
|
||||
|
||||
LV_ASSERT_MEM(ext->text);
|
||||
if(ext->text == NULL) return;
|
||||
|
||||
@@ -403,25 +403,6 @@ void lv_label_set_recolor(lv_obj_t * label, bool en)
|
||||
be hided or revealed*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the label to draw (or not draw) background specified in its style's body
|
||||
* @param label pointer to a label object
|
||||
* @param en true: draw body; false: don't draw body
|
||||
*/
|
||||
void lv_label_set_body_draw(lv_obj_t * label, bool en)
|
||||
{
|
||||
LV_ASSERT_OBJ(label, LV_OBJX_NAME);
|
||||
|
||||
lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
|
||||
if(ext->body_draw == en) return;
|
||||
|
||||
ext->body_draw = en == false ? 0 : 1;
|
||||
|
||||
lv_obj_refresh_ext_draw_pad(label);
|
||||
|
||||
lv_obj_invalidate(label);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the label's animation speed in LV_LABEL_LONG_SROLL/SCROLL_CIRC modes
|
||||
* @param label pointer to a label object
|
||||
@@ -546,19 +527,6 @@ bool lv_label_get_recolor(const lv_obj_t * label)
|
||||
return ext->recolor == 0 ? false : true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the body draw attribute
|
||||
* @param label pointer to a label object
|
||||
* @return true: draw body; false: don't draw body
|
||||
*/
|
||||
bool lv_label_get_body_draw(const lv_obj_t * label)
|
||||
{
|
||||
LV_ASSERT_OBJ(label, LV_OBJX_NAME);
|
||||
|
||||
lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
|
||||
return ext->body_draw == 0 ? false : true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the label's animation speed in LV_LABEL_LONG_ROLL and SCROLL modes
|
||||
* @param label pointer to a label object
|
||||
@@ -649,6 +617,7 @@ void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t char_id, lv_point_
|
||||
uint16_t visual_char_pos = lv_bidi_get_visual_pos(&txt[line_start], &mutable_bidi_txt, new_line_start - line_start, lv_obj_get_base_dir(label), line_char_id, &is_rtl);
|
||||
bidi_txt = mutable_bidi_txt;
|
||||
if (is_rtl) visual_char_pos++;
|
||||
|
||||
visual_byte_pos = lv_txt_encoded_get_byte_id(bidi_txt, visual_char_pos);
|
||||
}
|
||||
#else
|
||||
@@ -1046,29 +1015,28 @@ static lv_design_res_t lv_label_design(lv_obj_t * label, const lv_area_t * clip_
|
||||
if(mode == LV_DESIGN_COVER_CHK)
|
||||
return LV_DESIGN_RES_NOT_COVER;
|
||||
else if(mode == LV_DESIGN_DRAW_MAIN) {
|
||||
lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
|
||||
|
||||
lv_area_t coords;
|
||||
lv_obj_get_coords(label, &coords);
|
||||
|
||||
lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
|
||||
if(ext->body_draw) {
|
||||
lv_area_t bg;
|
||||
lv_obj_get_coords(label, &bg);
|
||||
lv_area_t bg;
|
||||
lv_obj_get_coords(label, &bg);
|
||||
|
||||
lv_coord_t left = lv_obj_get_style_int(label, LV_LABEL_PART_MAIN, LV_STYLE_PAD_LEFT);
|
||||
lv_coord_t right = lv_obj_get_style_int(label, LV_LABEL_PART_MAIN, LV_STYLE_PAD_RIGHT);
|
||||
lv_coord_t top = lv_obj_get_style_int(label, LV_LABEL_PART_MAIN, LV_STYLE_PAD_TOP);
|
||||
lv_coord_t bottom = lv_obj_get_style_int(label, LV_LABEL_PART_MAIN, LV_STYLE_PAD_BOTTOM);
|
||||
bg.x1 -= left;
|
||||
bg.x2 += right;
|
||||
bg.y1 -= top;
|
||||
bg.y2 += bottom;
|
||||
lv_coord_t left = lv_obj_get_style_int(label, LV_LABEL_PART_MAIN, LV_STYLE_PAD_LEFT);
|
||||
lv_coord_t right = lv_obj_get_style_int(label, LV_LABEL_PART_MAIN, LV_STYLE_PAD_RIGHT);
|
||||
lv_coord_t top = lv_obj_get_style_int(label, LV_LABEL_PART_MAIN, LV_STYLE_PAD_TOP);
|
||||
lv_coord_t bottom = lv_obj_get_style_int(label, LV_LABEL_PART_MAIN, LV_STYLE_PAD_BOTTOM);
|
||||
bg.x1 -= left;
|
||||
bg.x2 += right;
|
||||
bg.y1 -= top;
|
||||
bg.y2 += bottom;
|
||||
|
||||
lv_draw_rect_dsc_t draw_rect_dsc;
|
||||
lv_draw_rect_dsc_init(&draw_rect_dsc);
|
||||
lv_obj_init_draw_rect_dsc(label, LV_LABEL_PART_MAIN, &draw_rect_dsc);
|
||||
lv_draw_rect_dsc_t draw_rect_dsc;
|
||||
lv_draw_rect_dsc_init(&draw_rect_dsc);
|
||||
lv_obj_init_draw_rect_dsc(label, LV_LABEL_PART_MAIN, &draw_rect_dsc);
|
||||
|
||||
lv_draw_rect(&bg, clip_area, &draw_rect_dsc);
|
||||
}
|
||||
lv_draw_rect(&bg, clip_area, &draw_rect_dsc);
|
||||
|
||||
lv_label_align_t align = lv_label_get_align(label);
|
||||
|
||||
@@ -1181,16 +1149,14 @@ static lv_res_t lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param
|
||||
lv_label_refr_text(label);
|
||||
}
|
||||
} else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) {
|
||||
if(ext->body_draw) {
|
||||
lv_coord_t left = lv_obj_get_style_int(label, LV_LABEL_PART_MAIN, LV_STYLE_PAD_LEFT);
|
||||
lv_coord_t right = lv_obj_get_style_int(label, LV_LABEL_PART_MAIN, LV_STYLE_PAD_RIGHT);
|
||||
lv_coord_t top = lv_obj_get_style_int(label, LV_LABEL_PART_MAIN, LV_STYLE_PAD_TOP);
|
||||
lv_coord_t bottom = lv_obj_get_style_int(label, LV_LABEL_PART_MAIN, LV_STYLE_PAD_BOTTOM);
|
||||
label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, left);
|
||||
label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, right);
|
||||
label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, top);
|
||||
label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, bottom);
|
||||
}
|
||||
lv_coord_t left = lv_obj_get_style_int(label, LV_LABEL_PART_MAIN, LV_STYLE_PAD_LEFT);
|
||||
lv_coord_t right = lv_obj_get_style_int(label, LV_LABEL_PART_MAIN, LV_STYLE_PAD_RIGHT);
|
||||
lv_coord_t top = lv_obj_get_style_int(label, LV_LABEL_PART_MAIN, LV_STYLE_PAD_TOP);
|
||||
lv_coord_t bottom = lv_obj_get_style_int(label, LV_LABEL_PART_MAIN, LV_STYLE_PAD_BOTTOM);
|
||||
label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, left);
|
||||
label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, right);
|
||||
label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, top);
|
||||
label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, bottom);
|
||||
}
|
||||
else if(sign == LV_SIGNAL_BASE_DIR_CHG) {
|
||||
#if LV_USE_BIDI
|
||||
|
||||
@@ -95,8 +95,7 @@ typedef struct
|
||||
uint8_t static_txt : 1; /*Flag to indicate the text is static*/
|
||||
uint8_t align : 2; /*Align type from 'lv_label_align_t'*/
|
||||
uint8_t recolor : 1; /*Enable in-line letter re-coloring*/
|
||||
uint8_t expand : 1; /*Ignore real width (used by the library with LV_LABEL_LONG_ROLL)*/
|
||||
uint8_t body_draw : 1; /*Draw background body*/
|
||||
uint8_t expand : 1; /*Ignore real width (used by the library with LV_LABEL_LONG_SROLL)*/
|
||||
uint8_t dot_tmp_alloc : 1; /*True if dot_tmp has been allocated. False if dot_tmp directly holds up to 4 bytes of
|
||||
characters */
|
||||
} lv_label_ext_t;
|
||||
@@ -178,13 +177,6 @@ void lv_label_set_align(lv_obj_t * label, lv_label_align_t align);
|
||||
*/
|
||||
void lv_label_set_recolor(lv_obj_t * label, bool en);
|
||||
|
||||
/**
|
||||
* Set the label to draw (or not draw) background specified in its style's body
|
||||
* @param label pointer to a label object
|
||||
* @param en true: draw body; false: don't draw body
|
||||
*/
|
||||
void lv_label_set_body_draw(lv_obj_t * label, bool en);
|
||||
|
||||
/**
|
||||
* Set the label's animation speed in LV_LABEL_LONG_SROLL/SCROLL_CIRC modes
|
||||
* @param label pointer to a label object
|
||||
@@ -238,13 +230,6 @@ lv_label_align_t lv_label_get_align(const lv_obj_t * label);
|
||||
*/
|
||||
bool lv_label_get_recolor(const lv_obj_t * label);
|
||||
|
||||
/**
|
||||
* Get the body draw attribute
|
||||
* @param label pointer to a label object
|
||||
* @return true: draw body; false: don't draw body
|
||||
*/
|
||||
bool lv_label_get_body_draw(const lv_obj_t * label);
|
||||
|
||||
/**
|
||||
* Get the label's animation speed in LV_LABEL_LONG_ROLL and SCROLL modes
|
||||
* @param label pointer to a label object
|
||||
|
||||
@@ -218,7 +218,6 @@ lv_obj_t * lv_list_add_btn(lv_obj_t * list, const void * img_src, const char * t
|
||||
lv_obj_set_width(label, liste->coords.x2 - label->coords.x1 - pad);
|
||||
}
|
||||
if(label_signal == NULL) label_signal = lv_obj_get_signal_cb(label);
|
||||
|
||||
}
|
||||
|
||||
#if LV_USE_GROUP
|
||||
|
||||
@@ -77,8 +77,7 @@ lv_obj_t * lv_objmask_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
|
||||
/*Init the new object mask object mask*/
|
||||
if(copy == NULL) {
|
||||
lv_style_dsc_reset(&new_objmask->style_dsc);
|
||||
lv_obj_add_style_class(new_objmask, LV_OBJMASK_PART_MAIN, &lv_style_transp_tight);
|
||||
lv_obj_reset_style(new_objmask, LV_OBJMASK_PART_MAIN);
|
||||
|
||||
}
|
||||
/*TODO: Copy an existing object mask*/
|
||||
|
||||
@@ -904,6 +904,7 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi
|
||||
|
||||
/* Include the ancient signal function */
|
||||
res = ancestor_signal(scrl, sign, param);
|
||||
|
||||
if(res != LV_RES_OK) return res;
|
||||
if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, "");
|
||||
|
||||
@@ -1044,7 +1045,6 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -146,8 +146,7 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
lv_obj_set_size(new_ta, LV_TA_DEF_WIDTH, LV_TA_DEF_HEIGHT);
|
||||
lv_ta_set_sb_mode(new_ta, LV_SB_MODE_DRAG);
|
||||
|
||||
lv_style_dsc_reset(&ext->page.scrl->style_dsc);
|
||||
lv_obj_add_style_class(ext->page.scrl, LV_OBJ_PART_MAIN, &lv_style_transp_tight);
|
||||
lv_obj_reset_style(new_ta, LV_PAGE_PART_SCRL);
|
||||
|
||||
_ot(new_ta, LV_TA_PART_CURSOR, TA_CURSOR);
|
||||
|
||||
@@ -419,6 +418,7 @@ void lv_ta_del_char(lv_obj_t * ta)
|
||||
}
|
||||
|
||||
char * label_txt = lv_label_get_text(ext->label);
|
||||
|
||||
/*Delete a character*/
|
||||
lv_txt_cut(label_txt, ext->cursor.pos - 1, 1);
|
||||
/*Refresh the label*/
|
||||
@@ -446,6 +446,7 @@ void lv_ta_del_char(lv_obj_t * ta)
|
||||
placeholder_update(ta);
|
||||
|
||||
lv_event_send(ta, LV_EVENT_VALUE_CHANGED, NULL);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1496,6 +1497,7 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void
|
||||
|
||||
/* Include the ancient signal function */
|
||||
res = scrl_signal(scrl, sign, param);
|
||||
|
||||
if(res != LV_RES_OK) return res;
|
||||
if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, "");
|
||||
|
||||
@@ -1516,11 +1518,13 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void
|
||||
|
||||
lv_obj_set_width(ext->label, lv_page_get_fit_width(ta));
|
||||
lv_obj_set_pos(ext->label, 0, 0);
|
||||
lv_label_set_text(ext->label, NULL); /*Refresh the label*/
|
||||
|
||||
lv_label_set_text(ext->label, NULL); /*Refresh the label*/
|
||||
refr_cursor_area(ta);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if(sign == LV_SIGNAL_PRESSING || sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_PRESS_LOST ||
|
||||
sign == LV_SIGNAL_RELEASED) {
|
||||
update_cursor_position_on_click(ta, sign, (lv_indev_t *)param);
|
||||
@@ -1724,7 +1728,6 @@ static void refr_cursor_area(lv_obj_t * ta)
|
||||
ext->cursor.txt_byte_pos = byte_pos;
|
||||
|
||||
/*Calculate the cursor according to its type*/
|
||||
|
||||
lv_style_int_t top = lv_obj_get_style_int(ta, LV_TA_PART_CURSOR, LV_STYLE_PAD_TOP);
|
||||
lv_style_int_t bottom = lv_obj_get_style_int(ta, LV_TA_PART_CURSOR, LV_STYLE_PAD_BOTTOM);
|
||||
lv_style_int_t left = lv_obj_get_style_int(ta, LV_TA_PART_CURSOR, LV_STYLE_PAD_LEFT);
|
||||
|
||||
@@ -138,7 +138,8 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
lv_style_dsc_reset(lv_obj_get_style(new_tabview, LV_TABVIEW_PART_INDIC));
|
||||
lv_style_dsc_reset(lv_obj_get_style(new_tabview, LV_TABVIEW_PART_BTNS));
|
||||
lv_style_dsc_reset(lv_obj_get_style(new_tabview, LV_TABVIEW_PART_BTNS_BG));
|
||||
lv_obj_add_style_class(ext->content, LV_PAGE_PART_BG, &lv_style_transp_tight);
|
||||
|
||||
lv_obj_reset_style(ext->content, LV_PAGE_PART_BG);
|
||||
_ot(new_tabview, LV_TABVIEW_PART_BG_SCRL, TABVIEW_BG_SCRL);
|
||||
_ot(new_tabview, LV_TABVIEW_PART_BTNS, TABVIEW_BTNS);
|
||||
_ot(new_tabview, LV_TABVIEW_PART_BTNS_BG, TABVIEW_BTNS_BG);
|
||||
|
||||
Reference in New Issue
Block a user