mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-21 06:53:01 +08:00
fix warning in lv_draw_mask_angle_init
This commit is contained in:
parent
bdd0acf53a
commit
07317f771e
@ -234,17 +234,17 @@ void lv_draw_mask_angle_init(lv_draw_mask_param_t * param, lv_coord_t origo_x, l
|
|||||||
p->origo.y = origo_y;
|
p->origo.y = origo_y;
|
||||||
p->cb = lv_draw_mask_angle;
|
p->cb = lv_draw_mask_angle;
|
||||||
|
|
||||||
if(start_angle > 0 && start_angle < 180) {
|
if(start_angle >= 0 && start_angle < 180) {
|
||||||
start_side = LV_DRAW_MASK_LINE_SIDE_LEFT;
|
start_side = LV_DRAW_MASK_LINE_SIDE_LEFT;
|
||||||
}
|
}
|
||||||
else if(start_angle > 180 && start_angle < 360) {
|
else if(start_angle >= 180 && start_angle < 360) {
|
||||||
start_side = LV_DRAW_MASK_LINE_SIDE_RIGHT;
|
start_side = LV_DRAW_MASK_LINE_SIDE_RIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(end_angle > 0 && end_angle < 180) {
|
if(end_angle >= 0 && end_angle < 180) {
|
||||||
end_side = LV_DRAW_MASK_LINE_SIDE_RIGHT;
|
end_side = LV_DRAW_MASK_LINE_SIDE_RIGHT;
|
||||||
}
|
}
|
||||||
else if(end_angle > 180 && end_angle < 360) {
|
else if(end_angle >= 180 && end_angle < 360) {
|
||||||
end_side = LV_DRAW_MASK_LINE_SIDE_LEFT;
|
end_side = LV_DRAW_MASK_LINE_SIDE_LEFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,6 +184,7 @@ void lv_mbox_set_text(lv_obj_t * mbox, const char * txt)
|
|||||||
|
|
||||||
lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox);
|
lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox);
|
||||||
lv_label_set_text(ext->text, txt);
|
lv_label_set_text(ext->text, txt);
|
||||||
|
lv_label_set_align(ext->text, LV_LABEL_ALIGN_LEFT);
|
||||||
|
|
||||||
mbox_realign(mbox);
|
mbox_realign(mbox);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user