forked from enlightenment/efl
edje: modify to respect user set fixed property
Summary: this patch is related with @D11365. rather than undoing optimization edje calc, this patch introduces a user_set property which enables edje_calc to respect user set property. Reviewers: bu5hm4n, eagleeye, YOhoho, Hermet, zmike Reviewed By: zmike Subscribers: zmike, cedric, #reviewers, #committers, woohyun, eagleeye, bu5hm4n Tags: #efl Differential Revision: https://phab.enlightenment.org/D11366
This commit is contained in:
parent
c2738b4ed9
commit
7da106ec68
|
@ -9312,6 +9312,8 @@ st_collections_group_parts_part_description_fixed(void)
|
|||
|
||||
current_desc->fixed.w = parse_bool(0);
|
||||
current_desc->fixed.h = parse_bool(1);
|
||||
|
||||
current_desc->user_set.fixed = EINA_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2993,14 +2993,14 @@ _edje_part_recalc_single(Edje *ed,
|
|||
/* check whether this part has fixed value or not*/
|
||||
if ((rel1_to_x == rel2_to_x) &&
|
||||
(EQ(desc->rel1.relative_x, desc->rel2.relative_x)) &&
|
||||
(!chosen_desc->fixed.w))
|
||||
(!chosen_desc->fixed.w) && (!chosen_desc->user_set.fixed))
|
||||
{
|
||||
chosen_desc->fixed.w = 1;
|
||||
fixedw = EINA_TRUE;
|
||||
}
|
||||
if ((rel1_to_y == rel2_to_y) &&
|
||||
(EQ(desc->rel1.relative_y, desc->rel2.relative_y)) &&
|
||||
(!chosen_desc->fixed.h))
|
||||
(!chosen_desc->fixed.h) && (!chosen_desc->user_set.fixed))
|
||||
{
|
||||
chosen_desc->fixed.h = 1;
|
||||
fixedh = EINA_TRUE;
|
||||
|
|
|
@ -760,6 +760,7 @@ _edje_edd_init(void)
|
|||
EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(Edd, Type, "align_3d", align_3d, _edje_edd_edje_part_description_3d_vec); \
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.w", fixed.w, EET_T_UCHAR); \
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.h", fixed.h, EET_T_UCHAR); \
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "user_set.fixed", user_set.fixed, EET_T_UCHAR); \
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.have", minmul.have, EET_T_UCHAR); \
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.w", minmul.w, EDJE_T_FLOAT); \
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.h", minmul.h, EDJE_T_FLOAT); \
|
||||
|
@ -859,6 +860,7 @@ _edje_edd_init(void)
|
|||
EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(Edd, Type, "align_3d", Dec.align_3d, _edje_edd_edje_part_description_3d_vec); \
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.w", Dec.fixed.w, EET_T_UCHAR); \
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.h", Dec.fixed.h, EET_T_UCHAR); \
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "user_set.fixed", Dec.user_set.fixed, EET_T_UCHAR); \
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "min.w", Dec.min.w, EET_T_INT); \
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "min.h", Dec.min.h, EET_T_INT); \
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "max.w", Dec.max.w, EET_T_INT); \
|
||||
|
|
|
@ -1380,6 +1380,10 @@ struct _Edje_Part_Description_Common
|
|||
unsigned char limit; /* 0 == no, 1 = width, 2 = height, 3 = both */
|
||||
unsigned char no_render; /* no_render override @since 1.19 */
|
||||
unsigned char offset_is_scaled;
|
||||
|
||||
struct {
|
||||
Eina_Bool fixed;
|
||||
} user_set;
|
||||
};
|
||||
|
||||
struct _Edje_Part_Description_Spec_Fill
|
||||
|
|
Loading…
Reference in New Issue