components mobile scaling

This commit is contained in:
Jaquee
2017-08-07 15:47:56 +02:00
parent 66bb3fe7ac
commit 9e0db8f4ff
12 changed files with 124 additions and 125 deletions

View File

@@ -42,7 +42,7 @@ Rectangle {
var offset = 0
var item = button
while (item.under) {
offset += 20
offset += 20 * scaleRatio
item = item.under
}
return offset
@@ -50,7 +50,7 @@ Rectangle {
color: checked ? "#FFFFFF" : "#1C1C1C"
property bool present: !under || under.checked || checked || under.numSelectedChildren > 0
height: present ? ((appWindow.height >= 800) ? 64 : 52) : 0
height: present ? ((appWindow.height >= 800) ? 64 * scaleRatio : 52 * scaleRatio ) : 0
transform: Scale {
yScale: button.present ? 1 : 0
@@ -76,18 +76,18 @@ Rectangle {
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.leftMargin: parent.getOffset()
width: 50
width: 50 * scaleRatio
Rectangle {
id: dot
anchors.centerIn: parent
width: 16
width: 16 * scaleRatio
height: width
radius: height / 2
Rectangle {
anchors.centerIn: parent
width: 12
width: 12 * scaleRatio
height: width
radius: height / 2
color: "#1C1C1C"
@@ -98,7 +98,7 @@ Rectangle {
Text {
id: symbolText
anchors.centerIn: parent
font.pixelSize: 11
font.pixelSize: 11 * scaleRatio
font.bold: true
color: button.checked || buttonArea.containsMouse ? "#FFFFFF" : dot.color
visible: appWindow.ctrlPressed
@@ -117,7 +117,7 @@ Rectangle {
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 20
anchors.rightMargin: 20 * scaleRatio
anchors.leftMargin: parent.getOffset()
source: "../images/menuIndicator.png"
}
@@ -126,9 +126,9 @@ Rectangle {
id: label
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: parent.getOffset() + 50
anchors.leftMargin: parent.getOffset() + 50 * scaleRatio
font.family: "Arial"
font.pixelSize: 18
font.pixelSize: 18 * scaleRatio
color: parent.checked ? "#000000" : "#FFFFFF"
}