live_edit: add more condition for min size of live edit item
Summary: In case of the live edit item has min size without relative to part, the size of the item should not be changed. To cover this case, I added more condition Test Plan: 1. launch envnetor 2. click a live edit item on tools 3. check the fixed option without "relative to" setting 4. insert the item with mouse double click 5. see the min size of the item while the view size is changing Reviewers: Jaehyun_Cho, NikaWhite, bowonryu, Hermet Differential Revision: https://phab.enlightenment.org/D4173
This commit is contained in:
parent
7d88c580e1
commit
5ddaa8dbe5
|
@ -388,8 +388,22 @@ calc_relative_info(live_data *ld)
|
|||
ld->rel_to_info.rel1_x_part = strndup(ld->rel_to_info.rel2_x_part,
|
||||
strlen(ld->rel_to_info.rel2_x_part));
|
||||
}
|
||||
else
|
||||
{
|
||||
float center = (ld->rel_info.rel1_x + ld->rel_info.rel2_x) / 2;
|
||||
ld->rel_to_info.rel1_x = center;
|
||||
ld->rel_to_info.rel2_x = center;
|
||||
}
|
||||
ld->rel_to_info.min_w = min_w;
|
||||
}
|
||||
else
|
||||
{
|
||||
//If there is no relative setting, set base relative
|
||||
if (!ld->rel_to_info.rel1_x_part)
|
||||
ld->rel_to_info.rel1_x = ld->rel_info.rel1_x;
|
||||
if (!ld->rel_to_info.rel2_x_part)
|
||||
ld->rel_to_info.rel2_x = ld->rel_info.rel2_x;
|
||||
}
|
||||
|
||||
//Set fixed properties of height for current Live Edit Item
|
||||
if (fixed_h)
|
||||
|
@ -410,18 +424,22 @@ calc_relative_info(live_data *ld)
|
|||
ld->rel_to_info.rel1_y_part = strndup(ld->rel_to_info.rel2_y_part,
|
||||
strlen(ld->rel_to_info.rel2_y_part));
|
||||
}
|
||||
else
|
||||
{
|
||||
float center = (ld->rel_info.rel1_y + ld->rel_info.rel2_y) / 2;
|
||||
ld->rel_to_info.rel1_y = center;
|
||||
ld->rel_to_info.rel2_y = center;
|
||||
}
|
||||
ld->rel_to_info.min_h = min_h;
|
||||
}
|
||||
|
||||
//If there is no relative setting, set base relative
|
||||
if (!ld->rel_to_info.rel1_x_part)
|
||||
ld->rel_to_info.rel1_x = ld->rel_info.rel1_x;
|
||||
if (!ld->rel_to_info.rel1_y_part)
|
||||
ld->rel_to_info.rel1_y = ld->rel_info.rel1_y;
|
||||
if (!ld->rel_to_info.rel2_x_part)
|
||||
ld->rel_to_info.rel2_x = ld->rel_info.rel2_x;
|
||||
if (!ld->rel_to_info.rel2_y_part)
|
||||
ld->rel_to_info.rel2_y = ld->rel_info.rel2_y;
|
||||
else
|
||||
{
|
||||
//If there is no relative setting, set base relative
|
||||
if (!ld->rel_to_info.rel1_y_part)
|
||||
ld->rel_to_info.rel1_y = ld->rel_info.rel1_y;
|
||||
if (!ld->rel_to_info.rel2_y_part)
|
||||
ld->rel_to_info.rel2_y = ld->rel_info.rel2_y;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue