commit 326eab34088b7aaf48cb52eaec6268e547ced5a5
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Tue Dec 15 15:25:07 2020 +0100

    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 3950f054977c60cdbf73c805cbd898003974aaee)
---
 src/insets/InsetCollapsible.cpp |    1 +
 status.23x                      |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/insets/InsetCollapsible.cpp b/src/insets/InsetCollapsible.cpp
index 3a2a9a5..81b4561 100644
--- a/src/insets/InsetCollapsible.cpp
+++ b/src/insets/InsetCollapsible.cpp
@@ -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:
diff --git a/status.23x b/status.23x
index d9c81fb..4f282fa 100644
--- a/status.23x
+++ b/status.23x
@@ -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
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to