From 1dd09a60c479442e9667899f0bb4a3d950f36d12 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Mon, 6 Oct 2014 15:13:21 +0200 Subject: 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 --- qml/BootScreen.qml | 19 +++++-------------- 1 file 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 -- cgit v1.2.3