mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
checkbox: do not play transition on manual state change
This commit is contained in:
parent
ffd9b872d9
commit
f0fc45eb52
@ -152,6 +152,9 @@ void lv_checkbox_set_checked(lv_obj_t * cb, bool checked)
|
||||
|
||||
lv_obj_clear_state(ext->bullet, LV_STATE_DISABLED);
|
||||
lv_obj_clear_state(ext->label, LV_STATE_DISABLED);
|
||||
|
||||
lv_obj_finish_transitions(cb, LV_CHECKBOX_PART_BG);
|
||||
lv_obj_finish_transitions(ext->bullet, LV_OBJ_PART_MAIN);
|
||||
}
|
||||
|
||||
|
||||
@ -166,6 +169,9 @@ void lv_checkbox_set_disabled(lv_obj_t * cb)
|
||||
|
||||
lv_obj_add_state(ext->bullet, LV_STATE_DISABLED);
|
||||
lv_obj_add_state(ext->label, LV_STATE_DISABLED);
|
||||
|
||||
lv_obj_finish_transitions(cb, LV_CHECKBOX_PART_BG);
|
||||
lv_obj_finish_transitions(ext->bullet, LV_OBJ_PART_MAIN);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -179,6 +185,9 @@ void lv_checkbox_set_state(lv_obj_t * cb, lv_btn_state_t state)
|
||||
lv_btn_set_state(cb, state);
|
||||
lv_obj_set_state(ext->bullet, lv_obj_get_state(cb, LV_CHECKBOX_PART_BG));
|
||||
lv_obj_set_state(ext->bullet, lv_obj_get_state(cb, LV_CHECKBOX_PART_BG));
|
||||
|
||||
lv_obj_finish_transitions(cb, LV_CHECKBOX_PART_BG);
|
||||
lv_obj_finish_transitions(ext->bullet, LV_OBJ_PART_MAIN);
|
||||
}
|
||||
|
||||
/*=====================
|
||||
|
Loading…
x
Reference in New Issue
Block a user