lv_style: mass attribute renames

This commit is contained in:
Gabor Kiss-Vamosi
2017-10-18 16:07:19 +02:00
parent d9205adc60
commit 0856790760
25 changed files with 509 additions and 471 deletions

View File

@@ -341,7 +341,7 @@ cord_t lv_win_get_width(lv_obj_t * win)
lv_obj_t * scrl = lv_page_get_scrl(ext->page);
lv_style_t * style_scrl = lv_obj_get_style(scrl);
return lv_obj_get_width(scrl) - 2 * style_scrl->hpad;
return lv_obj_get_width(scrl) - 2 * style_scrl->body.pad_hor;
}
/**
@@ -412,16 +412,16 @@ static void lv_win_realign(lv_obj_t * win)
}
lv_style_t * btnh_style = lv_obj_get_style(ext->btnh);
lv_obj_set_height(ext->btnh, ext->cbtn_size + 2 * btnh_style->vpad * 2);
lv_obj_set_height(ext->btnh, ext->cbtn_size + 2 * btnh_style->body.pad_ver * 2);
lv_obj_set_width(ext->header, lv_obj_get_width(win));
/*Align the higher object first to make the correct header size first*/
if(lv_obj_get_height(ext->title) > lv_obj_get_height(ext->btnh)) {
lv_obj_align(ext->title, NULL, LV_ALIGN_IN_LEFT_MID, ext->style_header->hpad, 0);
lv_obj_align(ext->btnh, NULL, LV_ALIGN_IN_RIGHT_MID, - ext->style_header->hpad, 0);
lv_obj_align(ext->title, NULL, LV_ALIGN_IN_LEFT_MID, ext->style_header->body.pad_hor, 0);
lv_obj_align(ext->btnh, NULL, LV_ALIGN_IN_RIGHT_MID, - ext->style_header->body.pad_hor, 0);
} else {
lv_obj_align(ext->btnh, NULL, LV_ALIGN_IN_RIGHT_MID, - ext->style_header->hpad, 0);
lv_obj_align(ext->title, NULL, LV_ALIGN_IN_LEFT_MID, ext->style_header->hpad, 0);
lv_obj_align(ext->btnh, NULL, LV_ALIGN_IN_RIGHT_MID, - ext->style_header->body.pad_hor, 0);
lv_obj_align(ext->title, NULL, LV_ALIGN_IN_LEFT_MID, ext->style_header->body.pad_hor, 0);
}
lv_obj_set_pos_us(ext->header, 0, 0);
@@ -433,7 +433,7 @@ static void lv_win_realign(lv_obj_t * win)
lv_style_t * style_page = lv_obj_get_style(page);
lv_obj_t * scrl = lv_page_get_scrl(page);
lv_obj_set_width(scrl, lv_obj_get_width(page) - 2 * style_page->hpad);
lv_obj_set_width(scrl, lv_obj_get_width(page) - 2 * style_page->body.pad_hor);
}
#endif