Take label width into account for SubLabel insets

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

Fixes bug #12046.

(cherry picked from commit 3950f05497)
This commit is contained in:
Jean-Marc Lasgouttes 2020-12-15 15:25:07 +01:00
parent 43bc156a0b
commit 326eab3408
2 changed files with 3 additions and 0 deletions

View File

@ -184,6 +184,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:

View File

@ -62,6 +62,8 @@ What's new
- Do not close spellchecker after "Replace All" action (bug 11310).
- Fix width of collapsible insets with sublabels (bug 12046).
* INTERNALS