From ee77ee5c25f58271e6f2863225d08573da86c3ee Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 20 Jun 2011 10:01:55 +0200 Subject: Make it possible to set color of QStaticText with pixel size >= 64 Adding the fallback to QPainterPath for large QStaticTexts created a regression where all text would be painted in black regardless of the color you set on it. The color in QStaticTextItem is sometimes invalid, in which case the current painter color should be used. In either case, the color is already set on the current pen when entering drawStaticTextItem() so we can just use that. Task-number: QTBUG-19950 Reviewed-by: Jiang Jiang --- src/gui/painting/qpaintengineex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp index 8510416..5105d9a 100644 --- a/src/gui/painting/qpaintengineex.cpp +++ b/src/gui/painting/qpaintengineex.cpp @@ -1084,7 +1084,7 @@ void QPaintEngineEx::drawStaticTextItem(QStaticTextItem *staticTextItem) changedHints = true; } - fill(qtVectorPathForPath(path), staticTextItem->color); + fill(qtVectorPathForPath(path), s->pen.color()); if (changedHints) { s->renderHints = oldHints; -- cgit v0.12