void Dropdown::resize_list()
{
- list.autosize();
- Geometry lgeom = list.get_geometry();
+ Geometry lgeom;
+ list.autosize(lgeom);
lgeom.x = 0;
lgeom.y = -lgeom.h;
lgeom.w = max(geom.w, lgeom.w);
Geometry sgeom = part.get_geometry();
if(!sgeom.w || !sgeom.h)
{
- slider->autosize();
+ Geometry wgeom;
+ slider->autosize(wgeom);
if(!sgeom.w)
- sgeom.w = slider->get_geometry().w;
+ sgeom.w = wgeom.w;
if(!sgeom.h)
- sgeom.h = slider->get_geometry().h;
+ sgeom.h = wgeom.h;
}
const Sides &margin = part.get_margin();
Geometry sgeom = slider_part->get_geometry();
if(!sgeom.w || !sgeom.h)
{
- slider->autosize();
+ Geometry wgeom;
+ slider->autosize(wgeom);
if(!sgeom.w)
- sgeom.w = slider->get_geometry().w;
+ sgeom.w = wgeom.w;
if(!sgeom.h)
- sgeom.h = slider->get_geometry().h;
+ sgeom.h = wgeom.h;
}
slider_part->get_alignment().apply(sgeom, geom, slider_part->get_margin());
vert_pack.gravity = 1;
widget.signal_autosize_changed.connect(sigc::mem_fun(this, &Slot::autosize_changed));
widget.signal_visibility_changed.connect(sigc::mem_fun(this, &Slot::visibility_changed));
- widget.autosize();
- autosize_geom = widget.get_geometry();
+ widget.autosize(autosize_geom);
}
void Layout::Slot::autosize_changed()
else
item = new BasicItem(data->get_string(index));
add(*item);
- item->autosize();
item->signal_autosize_changed.connect(sigc::mem_fun(this, &List::item_autosize_changed));
return item;
}
const Sides &margin = part.get_margin();
for(list<Child *>::const_iterator i=children.begin(); i!=children.end(); ++i)
{
- const Geometry &cgeom = (*i)->widget->get_geometry();
+ Geometry cgeom;
+ (*i)->widget->autosize(cgeom);
ageom.w = max(ageom.w, cgeom.x+cgeom.w+margin.right);
ageom.h = max(ageom.h, cgeom.y+cgeom.h+margin.top);
}