mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
lv_sw: call action when released
This commit is contained in:
parent
bffa23c4b2
commit
fa89846ee3
@ -344,6 +344,8 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param)
|
||||
if(ext->changed == 0) {
|
||||
if(lv_sw_get_state(sw)) lv_sw_off_anim(sw);
|
||||
else lv_sw_on_anim(sw);
|
||||
|
||||
if(slider_action != NULL) res = slider_action(sw);
|
||||
}
|
||||
/*If the switch was dragged then calculate the new state based on the current position*/
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user