setButtonLabel();
}
+int InsetCollapsible::topOffset(BufferView const * bv) const
+{
+ switch (geometry(*bv)) {
+ case Corners:
+ case SubLabel:
+ return 0;
+ default:
+ return InsetText::topOffset(bv);
+ }
+}
+
+int InsetCollapsible::bottomOffset(BufferView const * bv) const
+{
+ switch (geometry(*bv)) {
+ case Corners:
+ case SubLabel:
+ return InsetText::bottomOffset(bv) / 4;
+ default:
+ return InsetText::bottomOffset(bv);
+ }
+}
+
Dimension InsetCollapsible::dimensionCollapsed(BufferView const & bv) const
{
break;
case Corners:
InsetText::metrics(mi, dim);
- dim.des -= 3;
- dim.asc -= 1;
break;
case SubLabel: {
InsetText::metrics(mi, dim);
}
int desc = textdim.descent();
- if (g == Corners)
- desc -= 3;
// Colour the frame according to the change type. (Like for tables.)
Color colour = pi.change.changed() ? pi.change.color()
int w = 0;
int a = 0;
int d = 0;
- Color const col = pi.full_repaint ? Color_none : pi.backgroundColor(this);
+ Color const col = pi.full_repaint ? Color_none : pi.backgroundColor();
theFontMetrics(font).rectText(buttonLabel(bv), w, a, d);
int const ww = max(textdim.wid, w);
pi.pain.rectText(x + (ww - w) / 2, y + desc + a,