summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Shinwoo <kimcinoo.efl@gmail.com>2012-07-26 03:57:25 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-07-26 03:57:25 +0000
commit7ed6a43c4cca4c524f3927c5bf467eea8cad6a91 (patch)
tree50dedba5890038bf0114a7594eab688e1caa815d
parentd7b4f4e55734a3e4dca3896ce278b8834430166a (diff)
From: Kim Shinwoo <kimcinoo.efl@gmail.com>
Subject: [E-devel] [patch][elementary] popup - getting proper geometry value] current popup does not give proper geometry value, evas_object_geometry_get(popup, &x, &y, &w, &h) gives 0, 0, 0, 0. the patch resolves it, but it would be not a good way to get geometry value. which is the best way to set obj->cur.geometry.x(y,w,h)? please enlighten me. thanks. SVN revision: 74409
-rw-r--r--config/profile.src2
-rw-r--r--src/lib/elc_popup.c8
2 files changed, 7 insertions, 3 deletions
diff --git a/config/profile.src b/config/profile.src
index 331d858ce..a6a7b9cd7 100644
--- a/config/profile.src
+++ b/config/profile.src
@@ -1 +1 @@
default \ No newline at end of file standard
diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c
index d81260b45..5337c3045 100644
--- a/src/lib/elc_popup.c
+++ b/src/lib/elc_popup.c
@@ -253,6 +253,7 @@ _sizing_eval(Evas_Object *obj)
253 Evas_Coord h_box = 0, minh_box = 0; 253 Evas_Coord h_box = 0, minh_box = 0;
254 Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1; 254 Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
255 Widget_Data *wd = elm_widget_data_get(obj); 255 Widget_Data *wd = elm_widget_data_get(obj);
256 Evas_Coord bx, by, bw, bh;
256 257
257 if (!wd) return; 258 if (!wd) return;
258 if (wd->items) 259 if (wd->items)
@@ -273,9 +274,7 @@ _sizing_eval(Evas_Object *obj)
273// evas_object_smart_calculate(wd->scr); 274// evas_object_smart_calculate(wd->scr);
274 } 275 }
275 evas_object_size_hint_min_get(wd->scr, &minw, &minh); 276 evas_object_size_hint_min_get(wd->scr, &minw, &minh);
276 printf("min: %ix%i\n", minw, minh);
277 evas_object_size_hint_max_get(wd->scr, &minw, &minh); 277 evas_object_size_hint_max_get(wd->scr, &minw, &minh);
278 printf("max: %ix%i\n", minw, minh);
279 278
280 edje_object_size_min_calc(elm_layout_edje_get(wd->base), &minw, &minh); 279 edje_object_size_min_calc(elm_layout_edje_get(wd->base), &minw, &minh);
281 evas_object_size_hint_min_set(wd->base, minw, minh); 280 evas_object_size_hint_min_set(wd->base, minw, minh);
@@ -283,6 +282,11 @@ _sizing_eval(Evas_Object *obj)
283 evas_object_size_hint_min_set(obj, minw, minh); 282 evas_object_size_hint_min_set(obj, minw, minh);
284 evas_object_size_hint_max_set(obj, maxw, maxh); 283 evas_object_size_hint_max_set(obj, maxw, maxh);
285 elm_layout_sizing_eval(wd->base); 284 elm_layout_sizing_eval(wd->base);
285
286 // hack hack hack. this widget needs a ... redo.
287 evas_object_geometry_get(wd->base, &bx, &by, &bw, &bh);
288 evas_object_resize(obj, bw, bh);
289 evas_object_move(obj, bx, by);
286} 290}
287 291
288static void 292static void