forked from enlightenment/enventor
live_edit: revise previous patch.
Actually, previous patch is not make sense.. fixed width and height should work exclusively.
This commit is contained in:
parent
e30aca010e
commit
d88a2121e1
|
@ -359,19 +359,24 @@ live_edit_insert(live_data *ld)
|
|||
//Calculate relative_to values to fix its size
|
||||
//in case of width and height are fixed
|
||||
Eina_Bool fixed_w = elm_check_state_get(ld->fixed_w_check);
|
||||
Eina_Bool fixed_h = elm_check_state_get(ld->fixed_h_check);
|
||||
|
||||
if (!ld->rel_to_info.rel1_x_to && !ld->rel_to_info.rel1_y_to &&
|
||||
!ld->rel_to_info.rel2_x_to && !ld->rel_to_info.rel2_y_to &&
|
||||
fixed_w && fixed_h)
|
||||
elm_check_state_get(ld->fixed_w_check))
|
||||
{
|
||||
float rel_x = (ld->rel_to_info.rel1_to_x +
|
||||
ld->rel_to_info.rel2_to_x) / 2;
|
||||
ld->rel_to_info.rel1_to_x = rel_x;
|
||||
ld->rel_to_info.rel2_to_x = rel_x;
|
||||
}
|
||||
|
||||
Eina_Bool fixed_h = elm_check_state_get(ld->fixed_h_check);
|
||||
|
||||
if (ld->rel_to_info.rel2_x_to && !ld->rel_to_info.rel2_y_to &&
|
||||
elm_check_state_get(ld->fixed_h_check))
|
||||
{
|
||||
float rel_y = (ld->rel_to_info.rel1_to_y +
|
||||
ld->rel_to_info.rel2_to_y) / 2;
|
||||
ld->rel_to_info.rel1_to_x = rel_x;
|
||||
ld->rel_to_info.rel1_to_y = rel_y;
|
||||
ld->rel_to_info.rel2_to_x = rel_x;
|
||||
ld->rel_to_info.rel2_to_y = rel_y;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue