1
0
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:
Gabor Kiss-Vamosi 2018-12-26 19:29:08 +01:00
parent bffa23c4b2
commit fa89846ee3

View File

@ -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 {