hermet pushed a commit to branch master.
commit c5ae0abae507988559395d369dab02d190106506
Author: Jaehyun Cho <[email protected]>
Date: Fri Sep 6 02:32:08 2013 +0900
[naviframe] - Set hint min size of the naviframe as the top item's min size
Signed-Off-By: JaeHyun <[email protected]>
---
src/lib/elc_naviframe.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c
index 0e28e38..5347fe8 100644
--- a/src/lib/elc_naviframe.c
+++ b/src/lib/elc_naviframe.c
@@ -857,20 +857,27 @@ static void
_elm_naviframe_smart_sizing_eval(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
{
Evas_Coord minw = -1, minh = -1;
- Elm_Naviframe_Item *it;
+ Elm_Naviframe_Item *it, *top;
Evas_Coord x, y, w, h;
Elm_Naviframe_Smart_Data *sd = _pd;
+ if (!sd->stack) return;
+
+ top = (EINA_INLIST_CONTAINER_GET(sd->stack->last, Elm_Naviframe_Item));
evas_object_geometry_get(obj, &x, &y, &w, &h);
EINA_INLIST_FOREACH(sd->stack, it)
{
evas_object_move(VIEW(it), x, y);
evas_object_resize(VIEW(it), w, h);
- edje_object_size_min_calc(elm_layout_edje_get(VIEW(it)),
- &it->minw, &it->minh);
- if (it->minw > minw) minw = it->minw;
- if (it->minh > minh) minh = it->minh;
+
+ if (it == top)
+ {
+ edje_object_size_min_calc(elm_layout_edje_get(VIEW(it)),
+ &it->minw, &it->minh);
+ minw = it->minw;
+ minh = it->minh;
+ }
}
evas_object_size_hint_min_set(obj, minw, minh);
--
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk