forked from enlightenment/efl
more accurate min size calculation for flow layouts
SVN revision: 39310
This commit is contained in:
parent
07235befaa
commit
a5a7e167d9
|
@ -1523,7 +1523,7 @@ evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *pri
|
|||
|
||||
for (i = 0, r = 0, l = priv->children; r <= row_count; r++)
|
||||
{
|
||||
int row_justify = 0, just_inc = 0, sub_pixel = 0, r_width = 0;
|
||||
int row_justify = 0, just_inc = 0, sub_pixel = 0;
|
||||
int row_size, remain_x;
|
||||
|
||||
row_size = row_break[r] - i;
|
||||
|
@ -1562,7 +1562,6 @@ evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *pri
|
|||
|
||||
evas_object_move(opt->obj, x + off_x, y + off_y);
|
||||
|
||||
r_width += child_w + padding_l + padding_r;
|
||||
x += child_w + padding_l + padding_r + row_justify;
|
||||
|
||||
sub_pixel += just_inc;
|
||||
|
@ -1574,8 +1573,7 @@ evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *pri
|
|||
}
|
||||
|
||||
evas_object_geometry_get(o, &x, NULL, NULL, NULL);
|
||||
if (min_w < r_width)
|
||||
min_w = r_width;
|
||||
min_w = row_width[r];
|
||||
min_h += row_max_h[r];
|
||||
y += row_max_h[r] + inc_y;
|
||||
}
|
||||
|
@ -1704,7 +1702,7 @@ evas_object_box_layout_flow_vertical(Evas_Object *o, Evas_Object_Box_Data *priv,
|
|||
|
||||
for (i = 0, c = 0, l = priv->children; c <= col_count; c++)
|
||||
{
|
||||
int col_justify = 0, just_inc = 0, sub_pixel = 0, c_height = 0;
|
||||
int col_justify = 0, just_inc = 0, sub_pixel = 0;
|
||||
int col_size, remain_y;
|
||||
|
||||
col_size = col_break[c] - i;
|
||||
|
@ -1743,7 +1741,6 @@ evas_object_box_layout_flow_vertical(Evas_Object *o, Evas_Object_Box_Data *priv,
|
|||
|
||||
evas_object_move(opt->obj, x + off_x, y + off_y);
|
||||
|
||||
c_height += child_h + padding_t + padding_b;
|
||||
y += child_h + padding_t + padding_b + col_justify;
|
||||
|
||||
sub_pixel += just_inc;
|
||||
|
@ -1756,8 +1753,7 @@ evas_object_box_layout_flow_vertical(Evas_Object *o, Evas_Object_Box_Data *priv,
|
|||
|
||||
evas_object_geometry_get(o, NULL, &y, NULL, NULL);
|
||||
min_w += col_max_w[c];
|
||||
if (min_h > c_height)
|
||||
min_h = c_height;
|
||||
min_h = col_height[c];
|
||||
x += col_max_w[c] + inc_x;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue