Description
When I have a list in “sinlge mode” and a “inactive” button, the button is actived again when I press another button
What MCU/Processor/Board and compiler are you using?
Simulator
What do you want to achieve?
I want the button to remain inactive when I press other buttons
What have you tried so far?
I have modified the source code of the list to avoid this behaviour, but I don’t know if there is another way, or if this could be merged into the source code
Code to reproduce
In the lv_list.c:
if(e == btn) {
lv_btn_set_state(e, LV_BTN_STATE_TGL_REL);
} else {
lv_btn_set_state(e, LV_BTN_STATE_REL);
}
I have added a line to check if it is inactive
if(e == btn) {
lv_btn_set_state(e, LV_BTN_STATE_TGL_REL);
} else {
if (lv_btn_get_state(e) != LV_BTN_STATE_INA)
lv_btn_set_state(e, LV_BTN_STATE_REL);
}
Screenshot and/or video
N/A