]> git.lyx.org Git - features.git/commitdiff
Fixup d207e85c: paint sublabel with the correct background color
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 24 Feb 2020 09:37:14 +0000 (10:37 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 24 Feb 2020 09:41:18 +0000 (10:41 +0100)
The above mentionned patch did paint the background of the sublabel to
avoid "bold-like" effect. However the correct backgound color is the
row's one, not the inset's one.

src/insets/InsetCollapsible.cpp

index 67d19ca8dd34f2d6f33c768849852acd9275bd0f..d4c3fd3ec73ce96407247cf559d0b705102e124b 100644 (file)
@@ -371,7 +371,7 @@ void InsetCollapsible::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);
+                       Color const col = pi.full_repaint ? Color_none : pi.background_color;
                        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,