fix imgbtn state change
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
|
||||
### Bugfixes
|
||||
- Theme update to support text selection background
|
||||
- Fix imgbtn state change
|
||||
|
||||
## v7.6.1 (06.10.2020)
|
||||
|
||||
|
||||
@@ -170,6 +170,26 @@ void lv_imgbtn_set_src_tiled(lv_obj_t * imgbtn, lv_btn_state_t state, const void
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Set the state of the image button
|
||||
* @param imgbtn pointer to an image button object
|
||||
* @param state the new state of the button (from lv_btn_state_t enum)
|
||||
*/
|
||||
void lv_imgbtn_set_state(lv_obj_t * imgbtn, lv_btn_state_t state)
|
||||
{
|
||||
lv_btn_set_state(imgbtn, state);
|
||||
refr_img(imgbtn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle the state of the image button (ON->OFF, OFF->ON)
|
||||
* @param imgbtn pointer to a image button object
|
||||
*/
|
||||
void lv_imgbtn_toggle(lv_obj_t * imgbtn)
|
||||
{
|
||||
lv_imgbtn_toggle(imgbtn);
|
||||
refr_img(imgbtn);
|
||||
}
|
||||
/*=====================
|
||||
* Getter functions
|
||||
*====================*/
|
||||
|
||||
@@ -98,6 +98,19 @@ void lv_imgbtn_set_src_tiled(lv_obj_t * imgbtn, lv_btn_state_t state, const void
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Set the state of the image button
|
||||
* @param imgbtn pointer to an image button object
|
||||
* @param state the new state of the button (from lv_btn_state_t enum)
|
||||
*/
|
||||
void lv_imgbtn_set_state(lv_obj_t * imgbtn, lv_btn_state_t state);
|
||||
|
||||
/**
|
||||
* Toggle the state of the image button (ON->OFF, OFF->ON)
|
||||
* @param imgbtn pointer to a image button object
|
||||
*/
|
||||
void lv_imgbtn_toggle(lv_obj_t * imgbtn);
|
||||
|
||||
/**
|
||||
* Enable the toggled states. On release the button will change from/to toggled state.
|
||||
* @param imgbtn pointer to an image button object
|
||||
@@ -108,24 +121,6 @@ static inline void lv_imgbtn_set_checkable(lv_obj_t * imgbtn, bool tgl)
|
||||
lv_btn_set_checkable(imgbtn, tgl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the state of the image button
|
||||
* @param imgbtn pointer to an image button object
|
||||
* @param state the new state of the button (from lv_btn_state_t enum)
|
||||
*/
|
||||
static inline void lv_imgbtn_set_state(lv_obj_t * imgbtn, lv_btn_state_t state)
|
||||
{
|
||||
lv_btn_set_state(imgbtn, state);
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle the state of the image button (ON->OFF, OFF->ON)
|
||||
* @param imgbtn pointer to a image button object
|
||||
*/
|
||||
static inline void lv_imgbtn_toggle(lv_obj_t * imgbtn)
|
||||
{
|
||||
lv_btn_toggle(imgbtn);
|
||||
}
|
||||
|
||||
/*=====================
|
||||
* Getter functions
|
||||
|
||||
Reference in New Issue
Block a user