+ if(part.get_name()=="items")
+ {
+ const Sides &margin = part.get_margin();
+
+ unsigned max_w = 0;
+ unsigned total_h = 0;
+ for(unsigned i=0; i<items.size(); ++i)
+ {
+ Geometry igeom;
+ items[i]->autosize(igeom);
+ max_w = max(max_w, igeom.w);
+ if(view_size==0 || i<view_size)
+ total_h += igeom.h;
+ }
+
+ if(!items.empty() && items.size()<view_size)
+ total_h = total_h*view_size/items.size();
+
+ ageom.w = max(ageom.w, max_w+margin.left+margin.right);
+ ageom.h = max(ageom.h, total_h+margin.top+margin.bottom);
+ }
+ else if(part.get_name()=="slider")
+ autosize_child(slider, part, ageom);