]> git.lyx.org Git - features.git/commitdiff
Clear background behind sublables when necessary.
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 4 Nov 2016 10:35:22 +0000 (11:35 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 4 Nov 2016 10:35:22 +0000 (11:35 +0100)
This is analogous to what has been done to address #4889 and #10359.

Fixes bug #10475.

src/insets/InsetCollapsable.cpp

index 668a91896ac1704c97cfb480de74d614cef1f626..250b25cbc0cf6414d5b070374c39fdb54195a242 100644 (file)
@@ -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;