Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
kisvegabor committed May 25, 2020
1 parent 0072a2a commit b4de4c5
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions src/lv_widgets/lv_cont.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b4de4c5

Please sign in to comment.