void InsetCollapsable::dimension_collapsed(Dimension & dim) const
{
font_metrics::buttonText(label, labelfont, dim.wid, dim.asc, dim.des);
- dim.wid += 2 * TEXT_TO_INSET_OFFSET;
}
void InsetCollapsable::draw_collapsed(PainterInfo & pi, int x, int y) const
{
- pi.pain.buttonText(x + TEXT_TO_INSET_OFFSET, y, label, labelfont);
+ pi.pain.buttonText(x, y, label, labelfont);
}
inset.draw(pi, x, y);
} else {
draw_collapsed(pi, old_x, bl);
- int const yy = bl + dim_collapsed.descent() + inset.ascent();
- inset.draw(pi, x, yy);
+ inset.draw(pi, x, bl + dim_collapsed.descent() + inset.ascent());
}
}