diff --git a/qml/CardModel.qml b/qml/CardModel.qml index 9815ab5..04a7855 100644 --- a/qml/CardModel.qml +++ b/qml/CardModel.qml @@ -18,6 +18,11 @@ Item { anchors.fill: parent source: cardModel.isFaceDown ? "qrc:/img/playing_cards/backs/" + cardModel.backStyle + ".svg" : cardModel.card ? "qrc:/img/playing_cards/fronts/" + cardModel.card.suitString + "_" + cardModel.card.valueString + ".svg" : "qrc:/img/playing_cards/backs/blue.svg" + + // This makes sure the SVG scales properly, otherwise it would + // attempt to scale the image from the original source size, which + // can end up being blurry. + sourceSize: Qt.size(width, height) fillMode: Image.PreserveAspectFit MouseArea { diff --git a/qml/DrawPile.qml b/qml/DrawPile.qml index 771c643..9354ed7 100644 --- a/qml/DrawPile.qml +++ b/qml/DrawPile.qml @@ -41,6 +41,12 @@ Item { source: "qrc:/img/flip_icon.svg" width: parent.width * 0.5 height: width + + // This makes sure the SVG scales properly, otherwise it would + // attempt to scale the image from the original source size, which + // can end up being blurry. + sourceSize: Qt.size(width, height) + fillMode: Image.Stretch } }