summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWonki Kim <wonki_.kim@samsung.com>2020-02-19 12:40:39 -0500
committerMike Blumenkrantz <zmike@samsung.com>2020-02-19 12:40:39 -0500
commit7da106ec681195a5538cfcf0da2cf4805173c23e (patch)
treedb8d36e85289c1dabfe5d3e88f1821d8bdfde119
parentc2738b4ed9d0361049c3f83dbdd050f750ad7b72 (diff)
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
-rw-r--r--src/bin/edje/edje_cc_handlers.c2
-rw-r--r--src/lib/edje/edje_calc.c4
-rw-r--r--src/lib/edje/edje_data.c2
-rw-r--r--src/lib/edje/edje_private.h4
4 files changed, 10 insertions, 2 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index b110292cb0..eb5cbd9e8b 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -9312,6 +9312,8 @@ st_collections_group_parts_part_description_fixed(void)
9312 9312
9313 current_desc->fixed.w = parse_bool(0); 9313 current_desc->fixed.w = parse_bool(0);
9314 current_desc->fixed.h = parse_bool(1); 9314 current_desc->fixed.h = parse_bool(1);
9315
9316 current_desc->user_set.fixed = EINA_TRUE;
9315} 9317}
9316 9318
9317/** 9319/**
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 30f556d722..7de6c66db6 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -2993,14 +2993,14 @@ _edje_part_recalc_single(Edje *ed,
2993 /* check whether this part has fixed value or not*/ 2993 /* check whether this part has fixed value or not*/
2994 if ((rel1_to_x == rel2_to_x) && 2994 if ((rel1_to_x == rel2_to_x) &&
2995 (EQ(desc->rel1.relative_x, desc->rel2.relative_x)) && 2995 (EQ(desc->rel1.relative_x, desc->rel2.relative_x)) &&
2996 (!chosen_desc->fixed.w)) 2996 (!chosen_desc->fixed.w) && (!chosen_desc->user_set.fixed))
2997 { 2997 {
2998 chosen_desc->fixed.w = 1; 2998 chosen_desc->fixed.w = 1;
2999 fixedw = EINA_TRUE; 2999 fixedw = EINA_TRUE;
3000 } 3000 }
3001 if ((rel1_to_y == rel2_to_y) && 3001 if ((rel1_to_y == rel2_to_y) &&
3002 (EQ(desc->rel1.relative_y, desc->rel2.relative_y)) && 3002 (EQ(desc->rel1.relative_y, desc->rel2.relative_y)) &&
3003 (!chosen_desc->fixed.h)) 3003 (!chosen_desc->fixed.h) && (!chosen_desc->user_set.fixed))
3004 { 3004 {
3005 chosen_desc->fixed.h = 1; 3005 chosen_desc->fixed.h = 1;
3006 fixedh = EINA_TRUE; 3006 fixedh = EINA_TRUE;
diff --git a/src/lib/edje/edje_data.c b/src/lib/edje/edje_data.c
index 41f73ab410..dfb84e5811 100644
--- a/src/lib/edje/edje_data.c
+++ b/src/lib/edje/edje_data.c
@@ -760,6 +760,7 @@ _edje_edd_init(void)
760 EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(Edd, Type, "align_3d", align_3d, _edje_edd_edje_part_description_3d_vec); \ 760 EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(Edd, Type, "align_3d", align_3d, _edje_edd_edje_part_description_3d_vec); \
761 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.w", fixed.w, EET_T_UCHAR); \ 761 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.w", fixed.w, EET_T_UCHAR); \
762 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.h", fixed.h, EET_T_UCHAR); \ 762 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.h", fixed.h, EET_T_UCHAR); \
763 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "user_set.fixed", user_set.fixed, EET_T_UCHAR); \
763 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.have", minmul.have, EET_T_UCHAR); \ 764 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.have", minmul.have, EET_T_UCHAR); \
764 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.w", minmul.w, EDJE_T_FLOAT); \ 765 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.w", minmul.w, EDJE_T_FLOAT); \
765 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.h", minmul.h, EDJE_T_FLOAT); \ 766 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.h", minmul.h, EDJE_T_FLOAT); \
@@ -859,6 +860,7 @@ _edje_edd_init(void)
859 EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(Edd, Type, "align_3d", Dec.align_3d, _edje_edd_edje_part_description_3d_vec); \ 860 EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(Edd, Type, "align_3d", Dec.align_3d, _edje_edd_edje_part_description_3d_vec); \
860 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.w", Dec.fixed.w, EET_T_UCHAR); \ 861 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.w", Dec.fixed.w, EET_T_UCHAR); \
861 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.h", Dec.fixed.h, EET_T_UCHAR); \ 862 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.h", Dec.fixed.h, EET_T_UCHAR); \
863 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "user_set.fixed", Dec.user_set.fixed, EET_T_UCHAR); \
862 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "min.w", Dec.min.w, EET_T_INT); \ 864 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "min.w", Dec.min.w, EET_T_INT); \
863 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "min.h", Dec.min.h, EET_T_INT); \ 865 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "min.h", Dec.min.h, EET_T_INT); \
864 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "max.w", Dec.max.w, EET_T_INT); \ 866 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "max.w", Dec.max.w, EET_T_INT); \
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index a35c7eca90..e38d6d57c5 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -1380,6 +1380,10 @@ struct _Edje_Part_Description_Common
1380 unsigned char limit; /* 0 == no, 1 = width, 2 = height, 3 = both */ 1380 unsigned char limit; /* 0 == no, 1 = width, 2 = height, 3 = both */
1381 unsigned char no_render; /* no_render override @since 1.19 */ 1381 unsigned char no_render; /* no_render override @since 1.19 */
1382 unsigned char offset_is_scaled; 1382 unsigned char offset_is_scaled;
1383
1384 struct {
1385 Eina_Bool fixed;
1386 } user_set;
1383}; 1387};
1384 1388
1385struct _Edje_Part_Description_Spec_Fill 1389struct _Edje_Part_Description_Spec_Fill