fix warnings
This commit is contained in:
@@ -156,6 +156,7 @@ void lv_imgbtn_set_style(lv_obj_t * imgbtn, lv_imgbtn_style_t type, lv_style_t *
|
||||
* Getter functions
|
||||
*====================*/
|
||||
|
||||
#if LV_IMGBTN_TILED == 0
|
||||
/**
|
||||
* Get the images in a given state
|
||||
* @param imgbtn pointer to an image button object
|
||||
@@ -164,10 +165,52 @@ void lv_imgbtn_set_style(lv_obj_t * imgbtn, lv_imgbtn_style_t type, lv_style_t *
|
||||
*/
|
||||
const void * lv_imgbtn_get_src(lv_obj_t * imgbtn, lv_btn_state_t state)
|
||||
{
|
||||
// lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
|
||||
lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
|
||||
|
||||
return NULL;//ext->img_src[state];
|
||||
return ext->img_src[state];
|
||||
}
|
||||
#else
|
||||
|
||||
/**
|
||||
* Get the left image in a given state
|
||||
* @param imgbtn pointer to an image button object
|
||||
* @param state the state where to get the image (from `lv_btn_state_t`) `
|
||||
* @return pointer to the left image source (a C array or path to a file)
|
||||
*/
|
||||
const void * lv_imgbtn_get_src_left(lv_obj_t * imgbtn, lv_btn_state_t state)
|
||||
{
|
||||
lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
|
||||
|
||||
return ext->img_src_left[state];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the middle image in a given state
|
||||
* @param imgbtn pointer to an image button object
|
||||
* @param state the state where to get the image (from `lv_btn_state_t`) `
|
||||
* @return pointer to the middle image source (a C array or path to a file)
|
||||
*/
|
||||
const void * lv_imgbtn_get_src_middle(lv_obj_t * imgbtn, lv_btn_state_t state)
|
||||
{
|
||||
lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
|
||||
|
||||
return ext->img_src_middle[state];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the right image in a given state
|
||||
* @param imgbtn pointer to an image button object
|
||||
* @param state the state where to get the image (from `lv_btn_state_t`) `
|
||||
* @return pointer to the left image source (a C array or path to a file)
|
||||
*/
|
||||
const void * lv_imgbtn_get_src_right(lv_obj_t * imgbtn, lv_btn_state_t state)
|
||||
{
|
||||
lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
|
||||
|
||||
return ext->img_src_right[state];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Get style of a image button.
|
||||
|
||||
@@ -156,6 +156,8 @@ void lv_imgbtn_set_style(lv_obj_t * imgbtn, lv_imgbtn_style_t type, lv_style_t *
|
||||
* Getter functions
|
||||
*====================*/
|
||||
|
||||
|
||||
#if LV_IMGBTN_TILED == 0
|
||||
/**
|
||||
* Get the images in a given state
|
||||
* @param imgbtn pointer to an image button object
|
||||
@@ -164,6 +166,33 @@ void lv_imgbtn_set_style(lv_obj_t * imgbtn, lv_imgbtn_style_t type, lv_style_t *
|
||||
*/
|
||||
const void * lv_imgbtn_get_src(lv_obj_t * imgbtn, lv_btn_state_t state);
|
||||
|
||||
#else
|
||||
|
||||
/**
|
||||
* Get the left image in a given state
|
||||
* @param imgbtn pointer to an image button object
|
||||
* @param state the state where to get the image (from `lv_btn_state_t`) `
|
||||
* @return pointer to the left image source (a C array or path to a file)
|
||||
*/
|
||||
const void * lv_imgbtn_get_src_left(lv_obj_t * imgbtn, lv_btn_state_t state);
|
||||
|
||||
/**
|
||||
* Get the middle image in a given state
|
||||
* @param imgbtn pointer to an image button object
|
||||
* @param state the state where to get the image (from `lv_btn_state_t`) `
|
||||
* @return pointer to the middle image source (a C array or path to a file)
|
||||
*/
|
||||
const void * lv_imgbtn_get_src_middle(lv_obj_t * imgbtn, lv_btn_state_t state);
|
||||
|
||||
/**
|
||||
* Get the right image in a given state
|
||||
* @param imgbtn pointer to an image button object
|
||||
* @param state the state where to get the image (from `lv_btn_state_t`) `
|
||||
* @return pointer to the left image source (a C array or path to a file)
|
||||
*/
|
||||
const void * lv_imgbtn_get_src_right(lv_obj_t * imgbtn, lv_btn_state_t state);
|
||||
|
||||
#endif
|
||||
/**
|
||||
* Get the current state of the image button
|
||||
* @param imgbtn pointer to a image button object
|
||||
|
||||
@@ -597,7 +597,6 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_
|
||||
for(col_merge = 0; col_merge + col < ext->col_cnt - 1; col_merge ++) {
|
||||
|
||||
if(ext->cell_data[cell + col_merge] != NULL) {
|
||||
lv_table_cell_format_t format;
|
||||
format.format_byte = ext->cell_data[cell + col_merge][0];
|
||||
if(format.right_merge) cell_area.x2 += ext->col_w[col + col_merge + 1];
|
||||
else break;
|
||||
|
||||
Reference in New Issue
Block a user