macOS: Remove use of deprecated QMatrix APIs in style
Change-Id: If88a6a49b6289eb16b3cc6fca7fd340a93b72934 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
parent
38d5ad2ee5
commit
60e1c3b698
@ -555,10 +555,10 @@ QRect rotateTabPainter(QPainter *p, QTabBar::Shape shape, QRect tabRect)
|
|||||||
newRot = -90;
|
newRot = -90;
|
||||||
}
|
}
|
||||||
tabRect.setRect(0, 0, tabRect.height(), tabRect.width());
|
tabRect.setRect(0, 0, tabRect.height(), tabRect.width());
|
||||||
QMatrix m;
|
QTransform transform;
|
||||||
m.translate(newX, newY);
|
transform.translate(newX, newY);
|
||||||
m.rotate(newRot);
|
transform.rotate(newRot);
|
||||||
p->setMatrix(m, true);
|
p->setTransform(transform, true);
|
||||||
}
|
}
|
||||||
return tabRect;
|
return tabRect;
|
||||||
}
|
}
|
||||||
@ -2951,24 +2951,24 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QMatrix matrix;
|
QTransform transform;
|
||||||
matrix.translate(opt->rect.center().x() + xOffset, opt->rect.center().y() + 2);
|
transform.translate(opt->rect.center().x() + xOffset, opt->rect.center().y() + 2);
|
||||||
QPainterPath path;
|
QPainterPath path;
|
||||||
switch(pe) {
|
switch(pe) {
|
||||||
default:
|
default:
|
||||||
case PE_IndicatorArrowDown:
|
case PE_IndicatorArrowDown:
|
||||||
break;
|
break;
|
||||||
case PE_IndicatorArrowUp:
|
case PE_IndicatorArrowUp:
|
||||||
matrix.rotate(180);
|
transform.rotate(180);
|
||||||
break;
|
break;
|
||||||
case PE_IndicatorArrowLeft:
|
case PE_IndicatorArrowLeft:
|
||||||
matrix.rotate(90);
|
transform.rotate(90);
|
||||||
break;
|
break;
|
||||||
case PE_IndicatorArrowRight:
|
case PE_IndicatorArrowRight:
|
||||||
matrix.rotate(-90);
|
transform.rotate(-90);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
p->setMatrix(matrix);
|
p->setTransform(transform);
|
||||||
|
|
||||||
path.moveTo(-halfSize, -halfSize * 0.5);
|
path.moveTo(-halfSize, -halfSize * 0.5);
|
||||||
path.lineTo(0.0, halfSize * 0.5);
|
path.lineTo(0.0, halfSize * 0.5);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user