From 7a5eff56b0498f478eb2120445bcf892cb809f41 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Wed, 7 Oct 2015 02:15:35 -0700 Subject: [PATCH] Set minimal width of fixedwidth collapsable insets. Intention behind this is actually Box inset being too tiny to reasonably contain other insets like ERT. http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg188987.html --- src/insets/InsetCollapsable.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index 623cebbc77..d656d7a29e 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -213,6 +213,11 @@ void InsetCollapsable::metrics(MetricsInfo & mi, Dimension & dim) const case TopButton: case LeftButton: case ButtonOnly: + if (hasFixedWidth()){ + const int mindim=button_dim.x2-button_dim.x1; + if (mi.base.textwidth