diff --git a/qml/items/Card.qml b/qml/items/Card.qml index a4d7f9d..f6549cf 100644 --- a/qml/items/Card.qml +++ b/qml/items/Card.qml @@ -11,9 +11,9 @@ FreeCellItem { property string suitChar property string suitColor stack: 0 - property int maxOffset : 50 - property int stackNarrowStart: deviceOrientation === Orientation.Portrait ? 8 : 6 - property double narrowMultiplier: deviceOrientation === Orientation.Portrait ? 1 : 1.5 + property int maxOffset : 50 * Theme.pixelRatio + property int stackNarrowStart: 5 * Theme.pixelRatio + property double narrowMultiplier: (deviceOrientation === Orientation.Portrait ? 1 : 1.5) * Theme.pixelRatio maxStack : 1 property int totalStack : 0 property Item dragParent @@ -30,8 +30,8 @@ FreeCellItem { [{x: 5, y: 5}, {x: 55, y: 5}]://, {x: 5, y: 42 }, {x: 55, y: 42}] : [{x: 5, y: 5}, {x: 69, y: 5}]//, {x: 5, y: 47 }, {x: 69, y: 47}] property bool dropEnabled : dropArea.enabled - width: deviceOrientation === Orientation.Portrait ? 60 : 74 - height: deviceOrientation === Orientation.Portrait ? 84 : 94 + width: (deviceOrientation === Orientation.Portrait ? 60 : 74) * Theme.pixelRatio + height: (deviceOrientation === Orientation.Portrait ? 84 : 94) * Theme.pixelRatio color: "white" border.color: "black" border.width: 1 @@ -243,7 +243,7 @@ FreeCellItem { id: rankText x:4; y:0 color: "black" - font.pixelSize: 24 + font.pixelSize: 24 * Theme.pixelRatio font.bold: true text: rankChar } @@ -252,7 +252,7 @@ FreeCellItem { x: card.width - font.pixelSize - 4/*32*/; y: 0 color: suitColor - font.pixelSize: 24 + font.pixelSize: 24 * Theme.pixelRatio text: suitChar } diff --git a/qml/items/Cell.qml b/qml/items/Cell.qml index a643660..b4ea67b 100644 --- a/qml/items/Cell.qml +++ b/qml/items/Cell.qml @@ -14,8 +14,8 @@ FreeCellItem { property var childCard; property bool dropEnabled : dropArea.enabled z: 1 - width: deviceOrientation === Orientation.Portrait ? 62 : 76 - height: deviceOrientation === Orientation.Portrait ? 86 : 96 + width: (deviceOrientation === Orientation.Portrait ? 62 : 76) * Theme.pixelRatio + height: (deviceOrientation === Orientation.Portrait ? 86 : 96) * Theme.pixelRatio color: Theme.rgba(Theme.secondaryHighlightColor, 0.5)//"#800000FF" border.color: "black" @@ -108,7 +108,7 @@ FreeCellItem { anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter color: "black" - font.pixelSize: 48 + font.pixelSize: 48 * Theme.pixelRatio opacity: 0.5 text: suitChar } diff --git a/qml/items/PlayField.qml b/qml/items/PlayField.qml index 9f61d3c..e5e0af6 100644 --- a/qml/items/PlayField.qml +++ b/qml/items/PlayField.qml @@ -4,18 +4,19 @@ import QtQuick.LocalStorage 2.0 Item { id : playfield - width : 470; height: 400 + width : parent.width // 470 * Theme.pixelRatio + height: parent.height // 400 * Theme.pixelRatio property bool canAutoMove : false property string type: "playfield" - property int smallGap: 2 - property int bigGap: 4 - property int cellGap: 20 - property int landCellsX : 570 - property int landCellsY : 12//140 + property int smallGap: 2 * Theme.pixelRatio + property int bigGap: 4 * Theme.pixelRatio + property int cellGap: 20 * Theme.pixelRatio + property int landCellsX : 570 * Theme.pixelRatio + property int landCellsY : 12 * Theme.pixelRatio //140 property int landFieldsY : 12 property int landFieldsX : 112 - property int portCellsX : 12 - property int portCellsY : 0 + property int portCellsX : 0.025 * width + property int portCellsY : 2 * Theme.pixelRatio property var selectedCard : null property var db diff --git a/qml/pages/FirstPage.qml b/qml/pages/FirstPage.qml index 4cb2a8a..7630187 100644 --- a/qml/pages/FirstPage.qml +++ b/qml/pages/FirstPage.qml @@ -65,15 +65,15 @@ Page { id: rect y: deviceOrientation === Orientation.Portrait ? 12 : 0 x: deviceOrientation === Orientation.Portrait ? 0 : 12 - width: deviceOrientation === Orientation.Portrait ? page.width : 80 + width: deviceOrientation === Orientation.Portrait ? page.width : 80 * Theme.pixelRatio anchors.left: deviceOrientation === Orientation.Portrait ? column.left : undefined - height: deviceOrientation === Orientation.Portrait ? 60 : page.height + height: deviceOrientation === Orientation.Portrait ? 60 * Theme.pixelRatio : page.height color : "transparent" //border.color: "white" //border.width: 1 Button { - + id: undoMove anchors.left: deviceOrientation === Orientation.Portrait ? rect.left : rect.left width: deviceOrientation === Orientation.Portrait ? rect.width / 2 : rect.width height: deviceOrientation === Orientation.Portrait ? rect.height : rect.height / 2 @@ -88,6 +88,7 @@ Page { } Button { + id: newGame width: deviceOrientation === Orientation.Portrait ? rect.width / 2 : rect.width height: deviceOrientation === Orientation.Portrait ? rect.height : rect.height / 2 y: deviceOrientation === Orientation.Portrait ? 0 : rect.height @@ -113,6 +114,7 @@ Page { { id: field y: deviceOrientation === Orientation.Portrait ? rect.height + 20 : 0 + x: deviceOrientation === Orientation.Portrait ? 0 : (rect.height <= 540 ? 0 : newGame.width) // jolla phone special } } }