Skip to content

Commit

Permalink
lv_win: add lv_win_set_content_size
Browse files Browse the repository at this point in the history
  • Loading branch information
kisvegabor committed Sep 18, 2019
1 parent a611160 commit 9c8e0f0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/lv_objx/lv_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions src/lv_objx/lv_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9c8e0f0

Please sign in to comment.