summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-09-18 14:49:08 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-18 14:57:52 +0900
commit7d2b4b69166c0f2abaf0f0bdec3b0d04eb721517 (patch)
treec82ef99a638b25a02df5ba201522efe22d76ce92 /src/lib/elementary
parent3bff7363b54b541aa78d8ed0f743631582086a95 (diff)
efl: Use Eina.Size2D for size hint restricted min
This is the "internal" or "intrinsic" minimum size, to be set by EFL and not by applications.
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_ui_box_stack.c8
-rw-r--r--src/lib/elementary/efl_ui_panes.c12
-rw-r--r--src/lib/elementary/efl_ui_win.c8
3 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/elementary/efl_ui_box_stack.c b/src/lib/elementary/efl_ui_box_stack.c
index c50ea05960..3b8f2faed2 100644
--- a/src/lib/elementary/efl_ui_box_stack.c
+++ b/src/lib/elementary/efl_ui_box_stack.c
@@ -9,7 +9,7 @@ _efl_ui_box_stack_efl_pack_layout_layout_update(Eo *obj, void *_pd EINA_UNUSED)
9{ 9{
10 Evas_Object_Box_Option *opt; 10 Evas_Object_Box_Option *opt;
11 Evas_Object_Box_Data *bd; 11 Evas_Object_Box_Data *bd;
12 int minw = 0, minh = 0; 12 Eina_Size2D min = { 0, 0 };
13 Eina_List *l; 13 Eina_List *l;
14 14
15 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(obj, EFL_UI_BOX_CLASS)); 15 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(obj, EFL_UI_BOX_CLASS));
@@ -27,10 +27,10 @@ _efl_ui_box_stack_efl_pack_layout_layout_update(Eo *obj, void *_pd EINA_UNUSED)
27 int mw = 0, mh = 0; 27 int mw = 0, mh = 0;
28 28
29 efl_gfx_size_hint_combined_min_get(child, &mw, &mh); 29 efl_gfx_size_hint_combined_min_get(child, &mw, &mh);
30 if (mw > minw) minw = mw; 30 if (mw > min.w) min.w = mw;
31 if (mh > minh) minh = mh; 31 if (mh > min.h) min.h = mh;
32 } 32 }
33 efl_gfx_size_hint_restricted_min_set(obj, minw, minh); 33 efl_gfx_size_hint_restricted_min_set(obj, min);
34} 34}
35 35
36#include "efl_ui_box_stack.eo.c" 36#include "efl_ui_box_stack.eo.c"
diff --git a/src/lib/elementary/efl_ui_panes.c b/src/lib/elementary/efl_ui_panes.c
index 2353ba57cf..6fc48e37eb 100644
--- a/src/lib/elementary/efl_ui_panes.c
+++ b/src/lib/elementary/efl_ui_panes.c
@@ -185,7 +185,7 @@ _efl_ui_panes_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Panes_Data *sd)
185 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 185 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
186 186
187 Eo *first_content, *second_content; 187 Eo *first_content, *second_content;
188 int minw, minh; 188 Eina_Size2D min;
189 189
190 first_content = efl_content_get(efl_part(obj, "first")); 190 first_content = efl_content_get(efl_part(obj, "first"));
191 second_content = efl_content_get(efl_part(obj, "second")); 191 second_content = efl_content_get(efl_part(obj, "second"));
@@ -208,16 +208,16 @@ _efl_ui_panes_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Panes_Data *sd)
208 208
209 if (sd->dir == EFL_UI_DIR_HORIZONTAL) 209 if (sd->dir == EFL_UI_DIR_HORIZONTAL)
210 { 210 {
211 minw = MAX(sd->first_min.w, sd->second_min.w); 211 min.w = MAX(sd->first_min.w, sd->second_min.w);
212 minh = sd->first_min.h + sd->second_min.h; 212 min.h = sd->first_min.h + sd->second_min.h;
213 } 213 }
214 else 214 else
215 { 215 {
216 minw = sd->first_min.w + sd->second_min.w; 216 min.w = sd->first_min.w + sd->second_min.w;
217 minh = MAX(sd->first_min.h, sd->second_min.h); 217 min.h = MAX(sd->first_min.h, sd->second_min.h);
218 } 218 }
219 219
220 efl_gfx_size_hint_restricted_min_set(obj, minw, minh); 220 efl_gfx_size_hint_restricted_min_set(obj, min);
221 _set_min_size_new(obj); 221 _set_min_size_new(obj);
222} 222}
223 223
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index c32754e97c..8e1b357058 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -1614,7 +1614,7 @@ _elm_win_state_change(Ecore_Evas *ee)
1614 } 1614 }
1615 if (ch_wm_rotation) 1615 if (ch_wm_rotation)
1616 { 1616 {
1617 efl_gfx_size_hint_restricted_min_set(obj, -1, -1); 1617 efl_gfx_size_hint_restricted_min_set(obj, EINA_SIZE2D(-1, -1));
1618 efl_gfx_size_hint_max_set(obj, EINA_SIZE2D(-1, -1)); 1618 efl_gfx_size_hint_max_set(obj, EINA_SIZE2D(-1, -1));
1619#ifdef HAVE_ELEMENTARY_X 1619#ifdef HAVE_ELEMENTARY_X
1620 ELM_WIN_DATA_ALIVE_CHECK(obj, sd); 1620 ELM_WIN_DATA_ALIVE_CHECK(obj, sd);
@@ -3495,7 +3495,7 @@ _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize)
3495 } 3495 }
3496 3496
3497 sd->tmp_updating_hints = 1; 3497 sd->tmp_updating_hints = 1;
3498 efl_gfx_size_hint_restricted_min_set(obj, minw, minh); 3498 efl_gfx_size_hint_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
3499 efl_gfx_size_hint_max_set(obj, EINA_SIZE2D(maxw, maxh)); 3499 efl_gfx_size_hint_max_set(obj, EINA_SIZE2D(maxw, maxh));
3500 sd->tmp_updating_hints = 0; 3500 sd->tmp_updating_hints = 0;
3501 _elm_win_size_hints_update(obj, sd); 3501 _elm_win_size_hints_update(obj, sd);
@@ -6079,7 +6079,7 @@ _win_rotate(Evas_Object *obj, Efl_Ui_Win_Data *sd, int rotation, Eina_Bool resiz
6079 sd->rot = rotation; 6079 sd->rot = rotation;
6080 if (resize) TRAP(sd, rotation_with_resize_set, rotation); 6080 if (resize) TRAP(sd, rotation_with_resize_set, rotation);
6081 else TRAP(sd, rotation_set, rotation); 6081 else TRAP(sd, rotation_set, rotation);
6082 efl_gfx_size_hint_restricted_min_set(obj, -1, -1); 6082 efl_gfx_size_hint_restricted_min_set(obj, EINA_SIZE2D(-1, -1));
6083 efl_gfx_size_hint_max_set(obj, EINA_SIZE2D(-1, -1)); 6083 efl_gfx_size_hint_max_set(obj, EINA_SIZE2D(-1, -1));
6084 _elm_win_resize_objects_eval(obj, EINA_FALSE); 6084 _elm_win_resize_objects_eval(obj, EINA_FALSE);
6085#ifdef HAVE_ELEMENTARY_X 6085#ifdef HAVE_ELEMENTARY_X
@@ -8080,7 +8080,7 @@ _window_layout_stack(Evas_Object *o, Evas_Object_Box_Data *p, void *data)
8080 } 8080 }
8081 8081
8082 if (minw < menuw) minw = menuw; 8082 if (minw < menuw) minw = menuw;
8083 efl_gfx_size_hint_restricted_min_set(o, minw, minh); 8083 efl_gfx_size_hint_restricted_min_set(o, EINA_SIZE2D(minw, minh));
8084 evas_object_geometry_get(o, &x, &y, &w, &h); 8084 evas_object_geometry_get(o, &x, &y, &w, &h);
8085 if (w < minw) w = minw; 8085 if (w < minw) w = minw;
8086 if (h < minh) h = minh; 8086 if (h < minh) h = minh;