diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2013-03-27 11:48:25 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-28 08:04:38 +0100 |
commit | c7cca2dd74bcfb0a2020fbb537fd47b50b2775c0 (patch) | |
tree | d25a8953b60ac8d30e7df896b7563af9ecc07209 /src/widgets | |
parent | ba3418ae752cb8d695c16aa6a6b056c55e38443f (diff) |
Make QMacStyle paint right side up again.
491dcbfac8 accidentally removed the y-axis inversion
for the widget case. Move it back to the common
code path.
Change-Id: Ie6bbe6f442ca342347af77071da3a743b5655159
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/styles/qmacstyle_mac.mm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index e39679ba65..1ea0e27418 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -6531,6 +6531,10 @@ QMacCGContext::QMacCGContext(QPainter *p) context = CGBitmapContextCreate((void *) image->bits(), image->width(), image->height(), 8, image->bytesPerLine(), colorspace, flags); + // Invert y axis. + CGContextTranslateCTM(context, 0, image->height()); + CGContextScaleCTM(context, 1, -1); + const qreal devicePixelRatio = image->devicePixelRatio(); if (devType == QInternal::Widget) { @@ -6555,10 +6559,6 @@ QMacCGContext::QMacCGContext(QPainter *p) CGContextScaleCTM(context, devicePixelRatio, devicePixelRatio); CGContextTranslateCTM(context, native.dx() / devicePixelRatio, native.dy() / devicePixelRatio); } else { - // Invert y axis. - CGContextTranslateCTM(context, 0, image->height()); - CGContextScaleCTM(context, 1, -1); - // Scale to paint in device-independent pixels. CGContextScaleCTM(context, devicePixelRatio, devicePixelRatio); } |