lv_win: add lv_win_set_content_size

This commit is contained in:
Gabor Kiss-Vamosi
2019-09-18 06:29:54 +02:00
parent a611160636
commit 9c8e0f0552
2 changed files with 21 additions and 0 deletions

View File

@@ -228,6 +228,18 @@ void lv_win_set_btn_size(lv_obj_t * win, lv_coord_t size)
lv_win_realign(win);
}
/**
* Set the size of the content area.
* @param win pointer to a window object
* @param w width
* @param h height (the window will be higher with the height of the header)
*/
void lv_win_set_content_size(lv_obj_t * win, lv_coord_t w, lv_coord_t h)
{
lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
h += lv_obj_get_height(ext->header);
}
/**
* Set the layout of the window
* @param win pointer to a window object

View File

@@ -132,6 +132,15 @@ void lv_win_set_title(lv_obj_t * win, const char * title);
*/
void lv_win_set_btn_size(lv_obj_t * win, lv_coord_t size);
/**
* Set the size of the content area.
* @param win pointer to a window object
* @param w width
* @param h height (the window will be higher with the height of the header)
*/
void lv_win_set_content_size(lv_obj_t * win, lv_coord_t w, lv_coord_t h);
/**
* Set the layout of the window
* @param win pointer to a window object