diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-09-14 23:52:47 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-09-14 23:52:47 (GMT) |
commit | ce34e5c61ff2849c91dbcfb3971aa1b0f95b5e4b (patch) | |
tree | 62483b87e7a337f6a54bdab5310f4c0857a46761 /src/declarative/fx/qfxtext.cpp | |
parent | 656e715e634c69d4b45ebd81e5980eaa4e56e308 (diff) | |
parent | 9fa3695eb3b03a4d37bc3c75bdb3bf5c5205e48c (diff) | |
download | Qt-ce34e5c61ff2849c91dbcfb3971aa1b0f95b5e4b.zip Qt-ce34e5c61ff2849c91dbcfb3971aa1b0f95b5e4b.tar.gz Qt-ce34e5c61ff2849c91dbcfb3971aa1b0f95b5e4b.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts:
src/declarative/fx/qfxtext.cpp
Diffstat (limited to 'src/declarative/fx/qfxtext.cpp')
-rw-r--r-- | src/declarative/fx/qfxtext.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/fx/qfxtext.cpp index 939a933..8d5ae87 100644 --- a/src/declarative/fx/qfxtext.cpp +++ b/src/declarative/fx/qfxtext.cpp @@ -634,15 +634,17 @@ QPixmap QFxTextPrivate::wrappedTextImage(bool drawStyle) //paint text QPixmap img(size); - img.fill(Qt::transparent); - QPainter p(&img); - if (drawStyle) { - p.setPen(styleColor); + if (!size.isEmpty()) { + img.fill(Qt::transparent); + QPainter p(&img); + if (drawStyle) { + p.setPen(styleColor); + } + else + p.setPen(color); + p.setFont(font); + layout.draw(&p, QPointF(0, 0)); } - else - p.setPen(color); - p.setFont(font); - layout.draw(&p, QPointF(0, 0)); return img; } |