mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-25 16:13:54 -07:00
macOS: Fix qt5.12 scale issues and dark mode (#3588)
* Maybe fix QT 5.12 scale. * Use Palette colors
This commit is contained in:
parent
e68305d7bf
commit
45b16ba78d
12 changed files with 32 additions and 21 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue