From b9edbfee40daaae41b189184b8c9f3519c4f96f6 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 4 Nov 2016 11:35:22 +0100 Subject: [PATCH] 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 d207e85cfda2893de4e6c7f419c58aa342395f47) --- src/insets/InsetCollapsable.cpp | 3 ++- status.22x | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index 4c292ccbe1..18d90a9f6d 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -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 diff --git a/status.22x b/status.22x index fd469dfbcc..bf526c837f 100644 --- a/status.22x +++ b/status.22x @@ -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