mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
minor fixes
This commit is contained in:
parent
d1c5f1c16e
commit
2dd9ca06d3
@ -600,8 +600,7 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
|
|||||||
/*Header*/
|
/*Header*/
|
||||||
if(lv_obj_get_child_id(obj) == 0 && lv_obj_check_type(lv_obj_get_parent(obj), &lv_win_class)) {
|
if(lv_obj_get_child_id(obj) == 0 && lv_obj_check_type(lv_obj_get_parent(obj), &lv_win_class)) {
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->bg_color_grey);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->bg_color_grey);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->pad_small);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->pad_tiny);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->text_align_center);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/*Content*/
|
/*Content*/
|
||||||
|
@ -58,7 +58,7 @@ lv_obj_t * lv_msgbox_create(const char * title, const char * txt, const char * b
|
|||||||
if(w > 2 * LV_DPI_DEF) w = 2 * LV_DPI_DEF;
|
if(w > 2 * LV_DPI_DEF) w = 2 * LV_DPI_DEF;
|
||||||
|
|
||||||
lv_obj_set_size(mbox, w, LV_SIZE_CONTENT);
|
lv_obj_set_size(mbox, w, LV_SIZE_CONTENT);
|
||||||
lv_obj_set_flex_flow(mbox, LV_FLEX_FLOW_ROW);
|
lv_obj_set_flex_flow(mbox, LV_FLEX_FLOW_ROW_WRAP);
|
||||||
|
|
||||||
lv_obj_t * label;
|
lv_obj_t * label;
|
||||||
label = lv_label_create(mbox);
|
label = lv_label_create(mbox);
|
||||||
|
@ -89,6 +89,7 @@ static void lv_win_constructor(lv_obj_t * obj)
|
|||||||
lv_obj_t * header = lv_obj_create(obj);
|
lv_obj_t * header = lv_obj_create(obj);
|
||||||
lv_obj_set_size(header, LV_SIZE_PCT(100), create_header_height);
|
lv_obj_set_size(header, LV_SIZE_PCT(100), create_header_height);
|
||||||
lv_obj_set_flex_flow(header, LV_FLEX_FLOW_ROW);
|
lv_obj_set_flex_flow(header, LV_FLEX_FLOW_ROW);
|
||||||
|
lv_obj_set_flex_place(header, LV_FLEX_PLACE_START, LV_FLEX_PLACE_CENTER, LV_FLEX_PLACE_CENTER);
|
||||||
|
|
||||||
lv_obj_t * cont = lv_obj_create(obj);
|
lv_obj_t * cont = lv_obj_create(obj);
|
||||||
lv_obj_set_flex_grow(cont, 1);
|
lv_obj_set_flex_grow(cont, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user