diff options
author | Juho Annunen <juho.annunen@qt.io> | 2018-08-20 12:25:40 +0300 |
---|---|---|
committer | Juho Annunen <juho.annunen@qt.io> | 2018-08-29 07:30:00 +0000 |
commit | 09aa32dd522176a9b9762e4d85b3e8c66d4d6be2 (patch) | |
tree | 06600dddeb2598e2745f21d52aad73b4ea456990 /basicsuite/ebike-ui/LightsBox.qml | |
parent | 1ff81b46a37550bb4430cc032b6d5504525af53f (diff) |
Fix some major scaling & font issues on ebike-demo
Task-number: QTBUG-69840
Change-Id: If519ae62a0a73c8dbf2f6f7b9f681bdfdb8b28a0
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Diffstat (limited to 'basicsuite/ebike-ui/LightsBox.qml')
-rw-r--r-- | basicsuite/ebike-ui/LightsBox.qml | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/basicsuite/ebike-ui/LightsBox.qml b/basicsuite/ebike-ui/LightsBox.qml index 327c819..b920864 100644 --- a/basicsuite/ebike-ui/LightsBox.qml +++ b/basicsuite/ebike-ui/LightsBox.qml @@ -41,20 +41,20 @@ import "./BikeStyle" // Bottom-left corner, controls Item { - width: 320 - height: UILayout.bottomViewHeight + width: root.width * 0.425 + height: root.height * 0.45 + property real imageMargin: Math.min(width, height) * 0.35 Image { id: lightsIcon - width: UILayout.lightsIconWidth - height: UILayout.lightsIconHeight + width: Math.min(parent.width, parent.height) * 0.35 + height: width source: datastore.lights ? "images/lights_on.png" : "images/lights_off.png" fillMode: Image.PreserveAspectFit anchors { - left: parent.left - leftMargin: UILayout.lightsIconLeft + right: parent.horizontalCenter bottom: parent.bottom - bottomMargin: UILayout.lightsIconBottom + bottomMargin: imageMargin } } @@ -64,7 +64,7 @@ Item { } Rectangle { - width: UILayout.horizontalViewSeparatorWidth + width: parent.width * 0.775 height: UILayout.horizontalViewSeparatorHeight anchors.top: parent.top anchors.left: parent.left @@ -73,7 +73,7 @@ Item { Rectangle { width: UILayout.verticalViewSeparatorWidth - height: UILayout.verticalViewSeparatorHeightBottom + height: parent.height * 0.475 anchors.bottom: parent.bottom anchors.right: parent.right color: Colors.separator |