From 3950f054977c60cdbf73c805cbd898003974aaee Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 15 Dec 2020 15:25:07 +0100 Subject: [PATCH] Take label width into account for SubLabel insets The drawing of the label should not go further than inset width. Fixes bug #12046. --- src/insets/InsetCollapsible.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/insets/InsetCollapsible.cpp b/src/insets/InsetCollapsible.cpp index f179afe72f..24aca66945 100644 --- a/src/insets/InsetCollapsible.cpp +++ b/src/insets/InsetCollapsible.cpp @@ -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: -- 2.39.5