]> git.lyx.org Git - features.git/commitdiff
When selecting special logos, set their color correctly
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 25 Oct 2016 13:13:23 +0000 (15:13 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 25 Oct 2016 13:13:23 +0000 (15:13 +0200)
It is not nice when they are the only thinkg in the text that does not
change color.

src/insets/InsetSpecialChar.cpp

index 3d32f406ea1bc812ac8553c303e8eeb6000c22af..b6bcb479c886829ae8b8a7de5cd49118fd18b11d 100644 (file)
@@ -139,8 +139,10 @@ namespace {
 // helper function: draw text and update x.
 void drawChar(PainterInfo & pi, int & x, int const y, char_type ch)
 {
-       pi.pain.text(x, y, ch, pi.base.font);
-       x += theFontMetrics(pi.base.font).width(ch);
+       FontInfo font = pi.base.font;
+       font.setPaintColor(pi.textColor(font.realColor()));
+       pi.pain.text(x, y, ch, font);
+       x += theFontMetrics(font).width(ch);
 }