- const Sides &margin = items_part->get_margin();
- geom.w += margin.left+margin.right;
- geom.h += margin.top+margin.bottom;
+ Geometry sgeom = slider_part->get_geometry();
+ if(!sgeom.w || !sgeom.h)
+ {
+ slider.autosize();
+ if(!sgeom.w)
+ sgeom.w = slider.get_geometry().w;
+ if(!sgeom.h)
+ sgeom.h = slider.get_geometry().h;
+ }
+
+ const Sides &margin = slider_part->get_margin();
+ geom.w = max(geom.w, sgeom.w+margin.left+margin.right);
+ geom.h = max(geom.h, sgeom.h+margin.top+margin.bottom);
+
+ reposition_slider();