lv_label: draw background if the style explictly set
This commit is contained in:
@@ -524,6 +524,11 @@ static bool lv_label_design(lv_obj_t * label, const area_t * mask, lv_design_mod
|
||||
}
|
||||
#endif
|
||||
|
||||
/*If the style is set explicitly draw background too*/
|
||||
if(label->style_p != NULL) {
|
||||
lv_draw_rect(&cords, mask, style);
|
||||
}
|
||||
|
||||
/*TEST: draw a background for the label*/
|
||||
//lv_vfill(&label->cords, mask, COLOR_LIME, OPA_COVER);
|
||||
|
||||
|
||||
@@ -166,7 +166,6 @@ bool lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param)
|
||||
/* (The created label will be deleted automatically) */
|
||||
} else if(sign == LV_SIGNAL_STYLE_CHG) {
|
||||
if(ext->label) {
|
||||
lv_obj_set_style(ext->label, lv_obj_get_style(ext->page.scrl));
|
||||
lv_obj_set_width(ext->label, lv_obj_get_width(ta) - 2 *
|
||||
(style->hpad + style->hpad));
|
||||
lv_label_set_text(ext->label, NULL);
|
||||
|
||||
Reference in New Issue
Block a user