lv_win: remove unused header style (Fixes #1041)

This commit is contained in:
Gabor Kiss-Vamosi
2019-04-23 05:59:10 +02:00
parent 9e3162080f
commit 5e60002a9b
2 changed files with 2 additions and 3 deletions

View File

@@ -64,7 +64,6 @@ lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy)
ext->page = NULL;
ext->header = NULL;
ext->title = NULL;
ext->style_header = &lv_style_plain_color;
ext->style_btn_rel = &lv_style_btn_rel;
ext->style_btn_pr = &lv_style_btn_pr;
ext->btn_size = (LV_DPI) / 2;
@@ -538,7 +537,8 @@ static void lv_win_realign(lv_obj_t * win)
btn = lv_obj_get_child_back(ext->header, btn);
}
lv_obj_align(ext->title, NULL, LV_ALIGN_IN_LEFT_MID, ext->style_header->body.padding.left, 0);
const lv_style_t * style_header = lv_win_get_style(win, LV_WIN_STYLE_HEADER);
lv_obj_align(ext->title, NULL, LV_ALIGN_IN_LEFT_MID, style_header->body.padding.left, 0);
lv_obj_set_pos(ext->header, 0, 0);

View File

@@ -61,7 +61,6 @@ typedef struct
lv_obj_t * page; /*Pointer to a page which holds the content*/
lv_obj_t * header; /*Pointer to the header container of the window*/
lv_obj_t * title; /*Pointer to the title label of the window*/
const lv_style_t * style_header; /*Style of the header container*/
const lv_style_t * style_btn_rel; /*Control button releases style*/
const lv_style_t * style_btn_pr; /*Control button pressed style*/
lv_coord_t btn_size; /*Size of the control buttons (square)*/