summaryrefslogtreecommitdiff
path: root/legacy/elementary
diff options
context:
space:
mode:
authorDaniel Juyung Seo <juyung.seo@samsung.com>2012-03-15 11:18:17 +0000
committerDaniel Juyung Seo <seojuyung2@gmail.com>2012-03-15 11:18:17 +0000
commitf49349b9e013add0b04c205d517ba43fbe8a9f65 (patch)
tree233aeb2080f233a125cda356114be696f4ec5ef3 /legacy/elementary
parent4fce6bd763aae05e78ac5d31d9a45f6ba43b7a06 (diff)
elm genlist: Refactored _sizing_eval.
Signed-off-by: Daniel Juyung Seo <juyung.seo@samsung.com> SVN revision: 69372
Diffstat (limited to 'legacy/elementary')
-rw-r--r--legacy/elementary/src/lib/elm_genlist.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/legacy/elementary/src/lib/elm_genlist.c b/legacy/elementary/src/lib/elm_genlist.c
index 55d6adeb8d..f24b67ea3b 100644
--- a/legacy/elementary/src/lib/elm_genlist.c
+++ b/legacy/elementary/src/lib/elm_genlist.c
@@ -627,13 +627,18 @@ _sizing_eval(Evas_Object *obj)
627{ 627{
628 Widget_Data *wd = elm_widget_data_get(obj); 628 Widget_Data *wd = elm_widget_data_get(obj);
629 Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1; 629 Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
630 Evas_Coord vmw = 0, vmh = 0;
630 if (!wd) return; 631 if (!wd) return;
631 evas_object_size_hint_min_get(wd->scr, &minw, &minh); 632
633 evas_object_size_hint_min_get(wd->scr, &minw, NULL);
632 evas_object_size_hint_max_get(wd->scr, &maxw, &maxh); 634 evas_object_size_hint_max_get(wd->scr, &maxw, &maxh);
633 minh = -1; 635
636 edje_object_size_min_calc
637 (elm_smart_scroller_edje_object_get(wd->scr), &vmw, &vmh);
638
634 if (wd->mode == ELM_LIST_COMPRESS) 639 if (wd->mode == ELM_LIST_COMPRESS)
635 { 640 {
636 Evas_Coord vw, vh, vmw, vmh; 641 Evas_Coord vw, vh;
637 642
638 elm_smart_scroller_child_viewport_size_get(wd->scr, &vw, &vh); 643 elm_smart_scroller_child_viewport_size_get(wd->scr, &vw, &vh);
639 if ((vw != 0) && (vw != wd->prev_viewport_w)) 644 if ((vw != 0) && (vw != wd->prev_viewport_w))
@@ -648,31 +653,20 @@ _sizing_eval(Evas_Object *obj)
648 if (wd->calc_job) ecore_job_del(wd->calc_job); 653 if (wd->calc_job) ecore_job_del(wd->calc_job);
649 wd->calc_job = ecore_job_add(_calc_job, wd); 654 wd->calc_job = ecore_job_add(_calc_job, wd);
650 } 655 }
651 edje_object_size_min_calc
652 (elm_smart_scroller_edje_object_get(wd->scr), &vmw, &vmh);
653 minw = vmw; 656 minw = vmw;
654 minh = vmh; 657 minh = vmh;
655 } 658 }
656 else if (wd->mode == ELM_LIST_LIMIT) 659 else if (wd->mode == ELM_LIST_LIMIT)
657 { 660 {
658 Evas_Coord vmw, vmh;
659
660 minw = wd->realminw;
661 maxw = -1; 661 maxw = -1;
662 elm_smart_scroller_child_viewport_size_get(wd->scr, &vmw, &vmh);
663 edje_object_size_min_calc
664 (elm_smart_scroller_edje_object_get(wd->scr), &vmw, &vmh);
665 minw = vmw + minw; 662 minw = vmw + minw;
666 } 663 }
667 else 664 else
668 { 665 {
669 Evas_Coord vmw, vmh;
670
671 edje_object_size_min_calc
672 (elm_smart_scroller_edje_object_get(wd->scr), &vmw, &vmh);
673 minw = vmw; 666 minw = vmw;
674 minh = vmh; 667 minh = vmh;
675 } 668 }
669
676 evas_object_size_hint_min_set(obj, minw, minh); 670 evas_object_size_hint_min_set(obj, minw, minh);
677 evas_object_size_hint_max_set(obj, maxw, maxh); 671 evas_object_size_hint_max_set(obj, maxw, maxh);
678} 672}