]> git.lyx.org Git - lyx.git/commitdiff
Fix bug #7653: Quotation marks have wrong color
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 29 Apr 2012 10:31:31 +0000 (12:31 +0200)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 29 Apr 2012 12:54:31 +0000 (14:54 +0200)
Quotation marks had the wrong color when using change tracking, or when
selecting.

src/insets/InsetQuotes.cpp

index 8586ce18d5372382689ae1cbcacbb93ddede55f5..1295f27f0753e0949fa11144ea9f9ddc4f193345 100644 (file)
@@ -230,14 +230,15 @@ void InsetQuotes::draw(PainterInfo & pi, int x, int y) const
 {
        // FIXME: should we add a language or a font parameter member?
        docstring const text = displayString();
-
+       FontInfo font = pi.base.font;
+       font.setPaintColor(pi.textColor(font.realColor()));
        if (text.length() == 2 && text[0] == text[1]) {
-               pi.pain.text(x, y, text[0], pi.base.font);
-               int const t = theFontMetrics(pi.base.font)
+               pi.pain.text(x, y, text[0], font);
+               int const t = theFontMetrics(font)
                        .width(',');
-               pi.pain.text(x + t, y, text[0], pi.base.font);
+               pi.pain.text(x + t, y, text[0], font);
        } else {
-               pi.pain.text(x, y, text, pi.base.font);
+               pi.pain.text(x, y, text, font);
        }
 }