From: Jean-Marc Lasgouttes Date: Fri, 4 Nov 2016 10:35:22 +0000 (+0100) Subject: Clear background behind sublables when necessary. X-Git-Tag: 2.3.0alpha1~769 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d207e85cfda2893de4e6c7f419c58aa342395f47;p=features.git Clear background behind sublables when necessary. This is analogous to what has been done to address #4889 and #10359. Fixes bug #10475. --- diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index 668a91896a..250b25cbc0 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -333,10 +333,11 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const int w = 0; int a = 0; int d = 0; + Color const col = pi.full_repaint ? Color_none : pi.backgroundColor(this); theFontMetrics(font).rectText(buttonLabel(bv), w, a, d); int const ww = max(textdim.wid, w); pi.pain.rectText(x + (ww - w) / 2, y + desc + a, - buttonLabel(bv), font, Color_none, Color_none); + buttonLabel(bv), font, col, Color_none); } int const y1 = y - textdim.asc + 3;