From: Martin Vermeer Date: Sat, 6 Oct 2007 08:15:40 +0000 (+0000) Subject: Get Conglomerate-style rendering back into order X-Git-Tag: 1.6.10~8001 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9585df177e3ecee0f0f18aeb5962c0606782da68;p=features.git Get Conglomerate-style rendering back into order git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20769 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index c53b8a5850..654979df7f 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -195,8 +195,7 @@ void InsetCollapsable::metrics(MetricsInfo & mi, Dimension & dim) const int d = 0; docstring s = layout_.labelstring; theFontMetrics(font).rectText(s, w, a, d); - dim.wid = max(dim.wid, w); - dim.des += d; + dim.des += a + d; break; } case TopButton: @@ -320,9 +319,10 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const int d = 0; docstring s = layout_.labelstring; theFontMetrics(font).rectText(s, w, a, d); - desc += d; - pi.pain.rectText(x + (textdim.wid - w) / 2, y + desc + a, + int const ww = max(textdim.wid, w); + pi.pain.rectText(x + (ww - w) / 2, y + desc + a, s, font, Color::none, Color::none); + desc += d; } // a visual cue when the cursor is inside the inset