remove dead code

This commit is contained in:
Gabor Kiss-Vamosi
2020-05-25 12:42:38 +02:00
parent 0072a2ade5
commit b4de4c5ca1

View File

@@ -560,42 +560,6 @@ static void lv_cont_layout_pretty(lv_obj_t * cont)
0,
act_y + lv_obj_get_style_margin_top(child_rs, LV_OBJ_PART_MAIN));
}
/*If there are two object in the row then align them proportionally*/
else if(obj_num == 2 && 0) {
lv_obj_t * obj1 = child_rs;
lv_obj_t * obj2 = _lv_ll_get_prev(&cont->child_ll, child_rs);
w_row = lv_obj_get_width(obj1) + lv_obj_get_width(obj2);
lv_coord_t pad = (w_obj - w_row) / 3;
switch(type) {
case LV_LAYOUT_PRETTY_TOP:
lv_obj_align(obj1, cont, LV_ALIGN_IN_TOP_LEFT,
pad + lv_obj_get_style_margin_left(obj1, LV_OBJ_PART_MAIN),
act_y + lv_obj_get_style_margin_top(obj1, LV_OBJ_PART_MAIN));
lv_obj_align(obj2, cont, LV_ALIGN_IN_TOP_RIGHT,
-pad - lv_obj_get_style_margin_right(obj2, LV_OBJ_PART_MAIN),
act_y + lv_obj_get_style_margin_top(obj2, LV_OBJ_PART_MAIN));
break;
case LV_LAYOUT_PRETTY_MID:
lv_obj_align(obj1, cont, LV_ALIGN_IN_TOP_LEFT,
pad + lv_obj_get_style_margin_left(obj1, LV_OBJ_PART_MAIN),
act_y + (h_row - lv_obj_get_height(obj1)) / 2 + lv_obj_get_style_margin_top(obj1, LV_OBJ_PART_MAIN));
lv_obj_align(obj2, cont, LV_ALIGN_IN_TOP_RIGHT,
-pad - lv_obj_get_style_margin_right(obj2, LV_OBJ_PART_MAIN),
act_y + (h_row - lv_obj_get_height(obj2)) / 2 + lv_obj_get_style_margin_top(obj2, LV_OBJ_PART_MAIN));
break;
case LV_LAYOUT_PRETTY_BOTTOM:
lv_obj_align(obj1, cont, LV_ALIGN_IN_TOP_LEFT,
pad + lv_obj_get_style_margin_left(obj1, LV_OBJ_PART_MAIN),
act_y + h_row - lv_obj_get_height(obj1) - lv_obj_get_style_margin_bottom(obj1, LV_OBJ_PART_MAIN));
lv_obj_align(obj2, cont, LV_ALIGN_IN_TOP_RIGHT,
-pad - lv_obj_get_style_margin_right(obj2, LV_OBJ_PART_MAIN),
act_y + h_row - lv_obj_get_height(obj2) - lv_obj_get_style_margin_bottom(obj2, LV_OBJ_PART_MAIN));
break;
default:
break;
}
}
/* Align the children (from child_rs to child_rc)*/
else {
w_row -= pinner * obj_num;