Take label width into account for SubLabel insets

The drawing of the label should not go further than inset width.

Fixes bug #12046.
This commit is contained in:
Jean-Marc Lasgouttes 2020-12-15 15:25:07 +01:00
parent 6a37a67b46
commit 3950f05497

View File

@ -223,6 +223,7 @@ void InsetCollapsible::metrics(MetricsInfo & mi, Dimension & dim) const
int d = 0;
theFontMetrics(font).rectText(buttonLabel(bv), w, a, d);
dim.des += a + d;
dim.wid = max(dim.wid, w);
break;
}
case TopButton: