Clear background behind sub-labels when necessary.

This is analogous to what has been done to address #4889 and #10359.

Fixes bug #10475.
(cherry picked from commit d207e85cfd)
This commit is contained in:
Jean-Marc Lasgouttes 2016-11-04 11:35:22 +01:00
parent a0b8ea2eee
commit b9edbfee40
2 changed files with 4 additions and 1 deletions

View File

@ -320,10 +320,11 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const
int w = 0; int w = 0;
int a = 0; int a = 0;
int d = 0; int d = 0;
Color const col = pi.full_repaint ? Color_none : pi.backgroundColor(this);
theFontMetrics(font).rectText(buttonLabel(bv), w, a, d); theFontMetrics(font).rectText(buttonLabel(bv), w, a, d);
int const ww = max(textdim.wid, w); int const ww = max(textdim.wid, w);
pi.pain.rectText(x + (ww - w) / 2, y + desc + a, 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 // a visual cue when the cursor is inside the inset

View File

@ -128,6 +128,8 @@ What's new
- Fix height of cursor inside insets (bug 10478). - Fix height of cursor inside insets (bug 10478).
- Fix bad painting of collapsable insets sub-label when selecting (bug 10475).
* INTERNALS * INTERNALS