Fix bug #7653: Quotation marks have wrong color

Quotation marks had the wrong color when using change tracking, or when
selecting.
This commit is contained in:
Vincent van Ravesteijn 2012-04-29 12:31:31 +02:00
parent 77c8c15947
commit 14ef7d2b82

View 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? // FIXME: should we add a language or a font parameter member?
docstring const text = displayString(); docstring const text = displayString();
FontInfo font = pi.base.font;
font.setPaintColor(pi.textColor(font.realColor()));
if (text.length() == 2 && text[0] == text[1]) { if (text.length() == 2 && text[0] == text[1]) {
pi.pain.text(x, y, text[0], pi.base.font); pi.pain.text(x, y, text[0], font);
int const t = theFontMetrics(pi.base.font) int const t = theFontMetrics(font)
.width(','); .width(',');
pi.pain.text(x + t, y, text[0], pi.base.font); pi.pain.text(x + t, y, text[0], font);
} else { } else {
pi.pain.text(x, y, text, pi.base.font); pi.pain.text(x, y, text, font);
} }
} }