diff options
author | Gatis Paeglis <gatis.paeglis@digia.com> | 2014-10-06 15:13:21 +0200 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@digia.com> | 2014-10-07 12:04:07 +0300 |
commit | 1dd09a60c479442e9667899f0bb4a3d950f36d12 (patch) | |
tree | da3788378562e04f2404ea92de67ad4d797305e7 | |
parent | d80296cc3aecb532e50e5ee262bd446546cb81cf (diff) |
Make boot logo and text proportions consistent
Make boot logo and text proportions consistent between
devices with different pixel density. Before this patch
"Boot to Qt" text in boot screen on nexus 2013 was as wide
as logo itself but on rpi with desktop monitor it was wider
then a logo.
Also remove undefined variable from bindings.
Change-Id: I75b1591f02cf4afe92b1150957cdd136026269e6
Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
-rw-r--r-- | qml/BootScreen.qml | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/qml/BootScreen.qml b/qml/BootScreen.qml index 49b76bd..3ae4ace 100644 --- a/qml/BootScreen.qml +++ b/qml/BootScreen.qml @@ -20,17 +20,12 @@ import QtQuick.Particles 2.0 Item { id: root - - property real size: Math.min(root.width, root.height); - property int particleLifeTime: 2000; SequentialAnimation { id: entryAnimation NumberAnimation { target: logo; property: "opacity"; to: 1; duration: 500 } -// NumberAnimation { target: logo; property: "t"; from: 0; to: 5; duration: 2000; easing.type: Easing.InCubic } - PauseAnimation { duration: 500 } ParallelAnimation { ScriptAction { script: { @@ -60,22 +55,18 @@ Item { width: engine.centimeter() * 3; height: width * sourceSize.height / sourceSize.width; anchors.centerIn: parent - anchors.verticalCenterOffset: -root.size * 0.1 + Math.random() * t; - anchors.horizontalCenterOffset: Math.random() * t; + anchors.verticalCenterOffset: -Math.min(engine.screenWidth(), engine.screenHeight()) * 0.1 source: "images/qt-logo.png" opacity: 0 - - property real t; - } Text { id: label - anchors.centerIn: parent - anchors.verticalCenterOffset: -root.size * 0.1 + logo.width; - - font.pixelSize: size * 0.04 + anchors.top: logo.bottom + anchors.topMargin: engine.mm(4) + anchors.horizontalCenter: logo.horizontalCenter + font.pixelSize: engine.fontSize() * 1.2 color: "white" text: "Boot to Qt" opacity: logo.opacity * 0.5 |