summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2017-12-13 14:53:35 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2017-12-13 14:55:16 +0900
commitd59003a6045d931f6590024cd15b2f3837a5857b (patch)
treee0266728f69df682b3dcede571d2170785791935
parent1fdbb00e225ce9e98e7ec2e2ec554eb5d1e02e69 (diff)
efl_ui_popup_alert_scroll: Modify variable name for better understanding
obj_min means the minimum size excluding scroller's minimum size. scr_min means the minimum size including scroller's minimum size.
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_scroll.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/lib/elementary/efl_ui_popup_alert_scroll.c b/src/lib/elementary/efl_ui_popup_alert_scroll.c
index 9adcf961c3..72a875cc25 100644
--- a/src/lib/elementary/efl_ui_popup_alert_scroll.c
+++ b/src/lib/elementary/efl_ui_popup_alert_scroll.c
@@ -16,22 +16,22 @@
16 16
17static void 17static void
18_scroller_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd, 18_scroller_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd,
19 Eina_Size2D exp_scr_min, Eina_Size2D min) 19 Eina_Size2D obj_min, Eina_Size2D scr_min)
20{ 20{
21 Eina_Size2D max_size; 21 Eina_Size2D max_size;
22 max_size.w = -1; 22 max_size.w = -1;
23 max_size.h = -1; 23 max_size.h = -1;
24 24
25 if (pd->max_size.w != -1) 25 if (pd->max_size.w != -1)
26 max_size.w = (exp_scr_min.w > pd->max_size.w) ? exp_scr_min.w : pd->max_size.w; 26 max_size.w = (obj_min.w > pd->max_size.w) ? obj_min.w : pd->max_size.w;
27 if (pd->max_size.h != -1) 27 if (pd->max_size.h != -1)
28 max_size.h = (exp_scr_min.h > pd->max_size.h) ? exp_scr_min.h : pd->max_size.h; 28 max_size.h = (obj_min.h > pd->max_size.h) ? obj_min.h : pd->max_size.h;
29 29
30 Eina_Size2D size; 30 Eina_Size2D size;
31 size.w = (exp_scr_min.w > pd->size.w) ? exp_scr_min.w : pd->size.w; 31 size.w = (obj_min.w > pd->size.w) ? obj_min.w : pd->size.w;
32 size.h = (exp_scr_min.h > pd->size.h) ? exp_scr_min.h : pd->size.h; 32 size.h = (obj_min.h > pd->size.h) ? obj_min.h : pd->size.h;
33 33
34 Eina_Size2D new_min = exp_scr_min; 34 Eina_Size2D new_min = obj_min;
35 35
36 if ((max_size.w == -1) && (max_size.h == -1)) 36 if ((max_size.w == -1) && (max_size.h == -1))
37 { 37 {
@@ -40,30 +40,30 @@ _scroller_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd,
40 } 40 }
41 else if ((max_size.w == -1) && (max_size.h != -1)) 41 else if ((max_size.w == -1) && (max_size.h != -1))
42 { 42 {
43 if (max_size.h < min.h) 43 if (max_size.h < scr_min.h)
44 { 44 {
45 elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE); 45 elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
46 efl_gfx_size_set(obj, EINA_SIZE2D(size.w, max_size.h)); 46 efl_gfx_size_set(obj, EINA_SIZE2D(size.w, max_size.h));
47 } 47 }
48 else 48 else
49 { 49 {
50 new_min.h = min.h; 50 new_min.h = scr_min.h;
51 elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_TRUE); 51 elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_TRUE);
52 efl_gfx_size_set(obj, EINA_SIZE2D(size.w, min.h)); 52 efl_gfx_size_set(obj, EINA_SIZE2D(size.w, scr_min.h));
53 } 53 }
54 } 54 }
55 else if ((max_size.w != -1) && (max_size.h == -1)) 55 else if ((max_size.w != -1) && (max_size.h == -1))
56 { 56 {
57 if (max_size.w < min.w) 57 if (max_size.w < scr_min.w)
58 { 58 {
59 elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE); 59 elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
60 efl_gfx_size_set(obj, EINA_SIZE2D(max_size.w, size.h)); 60 efl_gfx_size_set(obj, EINA_SIZE2D(max_size.w, size.h));
61 } 61 }
62 else 62 else
63 { 63 {
64 new_min.w = min.w; 64 new_min.w = scr_min.w;
65 elm_scroller_content_min_limit(pd->scroller, EINA_TRUE, EINA_FALSE); 65 elm_scroller_content_min_limit(pd->scroller, EINA_TRUE, EINA_FALSE);
66 efl_gfx_size_set(obj, EINA_SIZE2D(min.w, size.h)); 66 efl_gfx_size_set(obj, EINA_SIZE2D(scr_min.w, size.h));
67 } 67 }
68 } 68 }
69 else if ((max_size.w != -1) && (max_size.h != -1)) 69 else if ((max_size.w != -1) && (max_size.h != -1))
@@ -72,26 +72,26 @@ _scroller_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd,
72 Eina_Bool min_limit_w = EINA_FALSE; 72 Eina_Bool min_limit_w = EINA_FALSE;
73 Eina_Bool min_limit_h = EINA_FALSE; 73 Eina_Bool min_limit_h = EINA_FALSE;
74 74
75 if (max_size.w < min.w) 75 if (max_size.w < scr_min.w)
76 { 76 {
77 new_size.w = max_size.w; 77 new_size.w = max_size.w;
78 } 78 }
79 else 79 else
80 { 80 {
81 min_limit_w = EINA_TRUE; 81 min_limit_w = EINA_TRUE;
82 new_min.w = min.w; 82 new_min.w = scr_min.w;
83 new_size.w = min.w; 83 new_size.w = scr_min.w;
84 } 84 }
85 85
86 if (max_size.h < min.h) 86 if (max_size.h < scr_min.h)
87 { 87 {
88 new_size.h = max_size.h; 88 new_size.h = max_size.h;
89 } 89 }
90 else 90 else
91 { 91 {
92 min_limit_h = EINA_TRUE; 92 min_limit_h = EINA_TRUE;
93 new_min.h = min.h; 93 new_min.h = scr_min.h;
94 new_size.h = min.h; 94 new_size.h = scr_min.h;
95 } 95 }
96 96
97 elm_scroller_content_min_limit(pd->scroller, min_limit_w, min_limit_h); 97 elm_scroller_content_min_limit(pd->scroller, min_limit_w, min_limit_h);