macOS: Fix qt5.12 scale issues and dark mode (#3588)

* Maybe fix QT 5.12 scale.

* Use Palette colors
This commit is contained in:
Rob Blanckaert 2019-02-24 10:05:09 -08:00 committed by GitHub
parent e68305d7bf
commit 45b16ba78d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 32 additions and 21 deletions

View file

@ -77,13 +77,11 @@ void AbstractCardItem::transformPainter(QPainter *painter, const QSizeF &transla
QRectF totalBoundingRect = painter->combinedTransform().mapRect(boundingRect());
painter->resetTransform();
resetPainterTransform(painter);
QTransform pixmapTransform;
pixmapTransform.translate(totalBoundingRect.width() / 2, totalBoundingRect.height() / 2);
pixmapTransform.rotate(angle);
pixmapTransform.translate(-translatedSize.width() / 2, -translatedSize.height() / 2);
painter->setTransform(pixmapTransform);
painter->translate(totalBoundingRect.width() / 2, totalBoundingRect.height() / 2);
painter->rotate(angle);
painter->translate(-translatedSize.width() / 2, -translatedSize.height() / 2);
QFont f;
f.setPixelSize(fontSize);
@ -313,4 +311,4 @@ QVariant AbstractCardItem::itemChange(QGraphicsItem::GraphicsItemChange change,
return value;
} else
return QGraphicsItem::itemChange(change, value);
}
}