From 1b3700dbbd6b19f004ee8292113d9406c99fbe53 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 25 Nov 2010 10:53:06 +0000 Subject: [PATCH] Hi Raster. This is Myungjae Lee. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As I’ve talked to you just before, I’m sending you the patch file for applying max size in sizing_eval function in the scroller. This patch will work in the case below - elm_scroller_content_min_limit() function is set to 1 (either width or height) - the content’s min size is growing up unlimitedly (such as entry case) Then the min size of the scroller cannot exceed the max size of itself. (if we let it be grown up to the content’s min size, there is no way to limit the size of the scroller and to enable scrolling.) Please consider this way to avoid failure case (min is greater than max) in the sizing_eval function, and give me a feedback if it doesn’t meet any other requirement. Thank you. P.S.) patch file was created based on Rev. 54766. SVN revision: 54978 --- legacy/elementary/src/lib/elm_scroller.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/legacy/elementary/src/lib/elm_scroller.c b/legacy/elementary/src/lib/elm_scroller.c index 990ecc87b2..66a4d2733d 100644 --- a/legacy/elementary/src/lib/elm_scroller.c +++ b/legacy/elementary/src/lib/elm_scroller.c @@ -295,6 +295,9 @@ _sizing_eval(Evas_Object *obj) edje_object_size_min_calc(elm_smart_scroller_edje_object_get(wd->scr), &vmw, &vmh); if (wd->min_w) w = vmw + minw; if (wd->min_h) h = vmh + minh; + evas_object_size_hint_max_get(obj, &maxw, &maxh); + if ((maxw > 0) && (w > maxw)) w = maxw; + if ((maxh > 0) && (h > maxh)) h = maxh; evas_object_size_hint_min_set(obj, w, h); } }