mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(style): fix using width for both width and height in radius transition
fixes: #3427
This commit is contained in:
parent
88bbef14bf
commit
6acbdaa53d
@ -341,7 +341,7 @@ void _lv_obj_style_create_transition(lv_obj_t * obj, lv_part_t part, lv_state_t
|
|||||||
if(tr_dsc->prop == LV_STYLE_RADIUS) {
|
if(tr_dsc->prop == LV_STYLE_RADIUS) {
|
||||||
if(v1.num == LV_RADIUS_CIRCLE || v2.num == LV_RADIUS_CIRCLE) {
|
if(v1.num == LV_RADIUS_CIRCLE || v2.num == LV_RADIUS_CIRCLE) {
|
||||||
lv_coord_t whalf = lv_obj_get_width(obj) / 2;
|
lv_coord_t whalf = lv_obj_get_width(obj) / 2;
|
||||||
lv_coord_t hhalf = lv_obj_get_width(obj) / 2;
|
lv_coord_t hhalf = lv_obj_get_height(obj) / 2;
|
||||||
if(v1.num == LV_RADIUS_CIRCLE) v1.num = LV_MIN(whalf + 1, hhalf + 1);
|
if(v1.num == LV_RADIUS_CIRCLE) v1.num = LV_MIN(whalf + 1, hhalf + 1);
|
||||||
if(v2.num == LV_RADIUS_CIRCLE) v2.num = LV_MIN(whalf + 1, hhalf + 1);
|
if(v2.num == LV_RADIUS_CIRCLE) v2.num = LV_MIN(whalf + 1, hhalf + 1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user