diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2010-08-25 06:08:50 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2010-08-25 06:08:50 (GMT) |
commit | 36223d1aeb079a9628d403f87112da3b59652ba0 (patch) | |
tree | 5e7f20aba5883944d0fe5a0bc6aefd43d6cbb999 /src/declarative/graphicsitems/qdeclarativetext.cpp | |
parent | 0700370cb4f49483c24887d6bd8175df730954ed (diff) | |
download | Qt-36223d1aeb079a9628d403f87112da3b59652ba0.zip Qt-36223d1aeb079a9628d403f87112da3b59652ba0.tar.gz Qt-36223d1aeb079a9628d403f87112da3b59652ba0.tar.bz2 |
Alignment of shadow for rich text is broken when using text styles
Task-number: QTBUG-13142
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetext.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetext.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index b96b43c..e5ad743 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -1047,10 +1047,10 @@ QPixmap QDeclarativeTextPrivate::richTextImage(bool drawStyle) QAbstractTextDocumentLayout::PaintContext context; + QTextOption oldOption(doc->defaultTextOption()); if (drawStyle) { context.palette.setColor(QPalette::Text, styleColor); - // ### Do we really want this? - QTextOption colorOption; + QTextOption colorOption(doc->defaultTextOption()); colorOption.setFlags(QTextOption::SuppressColors); doc->setDefaultTextOption(colorOption); } else { @@ -1058,7 +1058,7 @@ QPixmap QDeclarativeTextPrivate::richTextImage(bool drawStyle) } doc->documentLayout()->draw(&p, context); if (drawStyle) - doc->setDefaultTextOption(QTextOption()); + doc->setDefaultTextOption(oldOption); return img; } |