diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-19 12:36:13 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-19 12:36:13 (GMT) |
commit | 8a97a1cac688d0e6e6aef40bfa396a81d7bfc0b8 (patch) | |
tree | 7770157160a1f0fd60b0a411378019662335ffa0 /src/gui/painting | |
parent | de0858687898f6e0e54cce3f986779c7aa1a350e (diff) | |
parent | 8cbf269e14b372ee3174c2706dd0cc4df37eef1a (diff) | |
download | Qt-8a97a1cac688d0e6e6aef40bfa396a81d7bfc0b8.zip Qt-8a97a1cac688d0e6e6aef40bfa396a81d7bfc0b8.tar.gz Qt-8a97a1cac688d0e6e6aef40bfa396a81d7bfc0b8.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Fix platform regression: Support QFont::setStretch() on Cocoa
Fix a memory leak from QItemSelectionModel when changing the model
Small hack to allow forcing off font smoothing on Mac OS X
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qpaintengine_mac.cpp | 6 | ||||
-rw-r--r-- | src/gui/painting/qpaintengine_mac_p.h | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp index 14ba94e..e5323d8 100644 --- a/src/gui/painting/qpaintengine_mac.cpp +++ b/src/gui/painting/qpaintengine_mac.cpp @@ -1390,7 +1390,11 @@ QCoreGraphicsPaintEngine::updateRenderHints(QPainter::RenderHints hints) CGContextSetInterpolationQuality(d->hd, (hints & QPainter::SmoothPixmapTransform) ? kCGInterpolationHigh : kCGInterpolationNone); } - CGContextSetShouldSmoothFonts(d->hd, hints & QPainter::TextAntialiasing); + bool textAntialiasing = (hints & QPainter::TextAntialiasing) == QPainter::TextAntialiasing; + if (!textAntialiasing || d->disabledSmoothFonts) { + d->disabledSmoothFonts = !textAntialiasing; + CGContextSetShouldSmoothFonts(d->hd, textAntialiasing); + } } /* diff --git a/src/gui/painting/qpaintengine_mac_p.h b/src/gui/painting/qpaintengine_mac_p.h index c9ab419..940b2bc 100644 --- a/src/gui/painting/qpaintengine_mac_p.h +++ b/src/gui/painting/qpaintengine_mac_p.h @@ -148,7 +148,7 @@ class QCoreGraphicsPaintEnginePrivate : public QPaintEnginePrivate Q_DECLARE_PUBLIC(QCoreGraphicsPaintEngine) public: QCoreGraphicsPaintEnginePrivate() - : hd(0), shading(0), stackCount(0), complexXForm(false) + : hd(0), shading(0), stackCount(0), complexXForm(false), disabledSmoothFonts(false) { } @@ -168,6 +168,7 @@ public: CGShadingRef shading; int stackCount; bool complexXForm; + bool disabledSmoothFonts; enum { CosmeticNone, CosmeticTransformPath, CosmeticSetPenWidth } cosmeticPen; // pixel and cosmetic pen size in user coordinates. |