Get rid of QMatrix

It is deprecated in Qt 6.
This commit is contained in:
Casper Jeukendrup 2021-07-06 22:33:26 +02:00 committed by Igor Korsukov
parent a6043b936c
commit 17868b7713
3 changed files with 4 additions and 4 deletions

View file

@ -3367,9 +3367,9 @@ void TextBase::drawEditMode(mu::draw::Painter* p, EditData& ed)
p->drawRect(cursor->cursorRect());
}
QMatrix matrix = p->worldTransform().toAffine();
QTransform transform = p->worldTransform();
p->translate(-pos);
p->setPen(Pen(Qt::lightGray, 4.0 / matrix.m11())); // 4 pixel pen size
p->setPen(Pen(Qt::lightGray, 4.0 / transform.m11())); // 4 pixel pen size
p->setBrush(BrushStyle::NoBrush);
qreal m = spatium();

View file

@ -176,7 +176,7 @@ public:
QBrush brush;
QPen pen;
QMatrix matrix;
QTransform transform;
// QFont font; // UNUSED
// GRADIENTS NOT IMPLEMENTED (YET)

View file

@ -1721,7 +1721,7 @@ void NotationInteraction::drawSelectionRange(draw::Painter* painter)
painter->setBrush(BrushStyle::NoBrush);
QColor selectionColor = configuration()->selectionColor();
qreal penWidth = 3.0 / painter->worldTransform().toAffine().m11();
qreal penWidth = 3.0 / painter->worldTransform().m11();
Pen pen;
pen.setColor(selectionColor);