fix(imgbtn) add lv_imgbtn_set_state

The normal lv_obj_add/clear_state couldn't refresh the image button properly.
This commit is contained in:
Gabor Kiss-Vamosi
2021-09-13 17:44:02 +02:00
parent 953d9fb003
commit 26e15fa577
3 changed files with 29 additions and 0 deletions

View File

@@ -34,6 +34,11 @@ The possible states are:
If you set sources only in `LV_IMGBTN_STATE_RELEASED`, these sources will be used in other states too.
If you set e.g. `LV_IMGBTN_STATE_PRESSED` they will be used in pressed state instead of the released images.
### States
Instead of the regular `lv_obj_add/clear_state()` functions the `lv_imgbtn_set_state(imgbtn, LV_IMGBTN_STATE_...)` functions should be used to manually set a state.
## Events
- `LV_EVENT_VALUE_CHANGED` Sent when the button is toggled.