- unsigned view_h = geom.h;
- if(const Part *items_part = style->get_part("items"))
- {
- const Sides &margin = items_part->get_margin();
- view_h -= margin.top+margin.bottom;
- }
+ const Sides &margin = items_part->get_margin();
+ unsigned view_h = geom.h-min(geom.h, margin.top+margin.bottom);