Update lv_cb.c

fix bug: when out of the range of the checkbox, and press, when move to the checkbox, the checkbox's state will change.
This commit is contained in:
fallstool
2018-09-19 16:28:23 +08:00
committed by GitHub
parent 4479080864
commit fc3b3d5c96
+1
View File
@@ -83,6 +83,7 @@ lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy)
lv_btn_set_layout(new_cb, LV_LAYOUT_ROW_M);
lv_btn_set_fit(new_cb, true, true);
lv_btn_set_toggle(new_cb, true);
lv_obj_set_protect(new_cb, LV_PROTECT_PRESS_LOST);
/*Set the default styles*/
lv_theme_t * th = lv_theme_get_current();