diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-09-02 15:21:50 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-09-02 21:35:31 +0200 |
commit | 60e1c3b69853a1eaa40744836876f2dce6e0a142 (patch) | |
tree | 5633470f035a1f1c6903acaf365ba53264b33f4a /src/plugins/styles/mac/qmacstyle_mac.mm | |
parent | 38d5ad2ee508e23b2d87bb2da3c2e33070e2337d (diff) |
macOS: Remove use of deprecated QMatrix APIs in style
Change-Id: If88a6a49b6289eb16b3cc6fca7fd340a93b72934
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/styles/mac/qmacstyle_mac.mm')
-rw-r--r-- | src/plugins/styles/mac/qmacstyle_mac.mm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index ec3bb91ebf..b2bcdb3e5b 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -555,10 +555,10 @@ QRect rotateTabPainter(QPainter *p, QTabBar::Shape shape, QRect tabRect) newRot = -90; } tabRect.setRect(0, 0, tabRect.height(), tabRect.width()); - QMatrix m; - m.translate(newX, newY); - m.rotate(newRot); - p->setMatrix(m, true); + QTransform transform; + transform.translate(newX, newY); + transform.rotate(newRot); + p->setTransform(transform, true); } return tabRect; } @@ -2951,24 +2951,24 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai } #endif - QMatrix matrix; - matrix.translate(opt->rect.center().x() + xOffset, opt->rect.center().y() + 2); + QTransform transform; + transform.translate(opt->rect.center().x() + xOffset, opt->rect.center().y() + 2); QPainterPath path; switch(pe) { default: case PE_IndicatorArrowDown: break; case PE_IndicatorArrowUp: - matrix.rotate(180); + transform.rotate(180); break; case PE_IndicatorArrowLeft: - matrix.rotate(90); + transform.rotate(90); break; case PE_IndicatorArrowRight: - matrix.rotate(-90); + transform.rotate(-90); break; } - p->setMatrix(matrix); + p->setTransform(transform); path.moveTo(-halfSize, -halfSize * 0.5); path.lineTo(0.0, halfSize * 0.5); |