]> git.lyx.org Git - features.git/commitdiff
Clear background behind sub-labels 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 17:01:49 +0000 (18:01 +0100)
This is analogous to what has been done to address #4889 and #10359.

Fixes bug #10475.
(cherry picked from commit d207e85cfda2893de4e6c7f419c58aa342395f47)

src/insets/InsetCollapsable.cpp
status.22x

index 4c292ccbe14a1d6c58fbaad3709237c669dd87ef..18d90a9f6de8718eb748602d9e67cc23655ca5f4 100644 (file)
@@ -320,10 +320,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);
                }
 
                // a visual cue when the cursor is inside the inset
index fd469dfbcc5cec1fb5f3ea0e7307404c98a3ff80..bf526c837fd556a096a7783f4a92cb35822674e2 100644 (file)
@@ -128,6 +128,8 @@ What's new
 
 - Fix height of cursor inside insets (bug 10478).
 
+- Fix bad painting of collapsable insets sub-label when selecting (bug 10475).
+
 
 * INTERNALS