+}
+
+void Button::autosize_special(const Part &part, Geometry &ageom)
+{
+ if(part.get_name()=="text")
+ text.autosize(part, ageom);
+ else if(part.get_name()=="icon" && icon)
+ {
+ const Sides &margin = part.get_margin();
+ ageom.w = max(ageom.w, icon->get_width()+margin.left+margin.right);
+ ageom.h = max(ageom.h, icon->get_height()+margin.top+margin.bottom);
+ }