}
+void List::SimpleItem::on_style_change()
+{
+ if(!style || children.empty())
+ return;
+
+ Widget *child = children.front()->widget;
+ child->autosize();
+ if(const Part *part = style->get_part("children"))
+ {
+ const Sides &margin = part->get_margin();
+ child->set_position(margin.left, margin.bottom);
+ }
+}
+
+
void List::MultiColumnItem::check_widths(vector<unsigned> &widths) const
{
if(widths.size()<children.size())
add(label);
}
-void List::BasicItem::on_style_change()
-{
- if(!style)
- return;
-
- label.autosize();
- if(const Part *part = style->get_part("children"))
- {
- const Sides &margin = part->get_margin();
- label.set_position(margin.left, margin.bottom);
- }
-}
-
List::Loader::Loader(List &l):
DataFile::DerivedObjectLoader<List, Widget::Loader>(l)