From da6b5d7b76224cdbced0d19e10a0f2d5282369e1 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Tue, 17 Nov 2015 15:15:43 +0200 Subject: Lighter theme for launcher Launcher now has white background. Also layout is a bit different. White background causes that also demo images needs to be changed so that application image edges are smooth Change-Id: I09e0db44571625b875273074ab210a6427423c08 Reviewed-by: Kalle Viironen --- qml/ApplicationIcon.qml | 62 ------------------------------------------ qml/BootScreen.qml | 7 ++--- qml/GlimmeringQtLogo.qml | 2 +- qml/LaunchScreen.qml | 39 +++++++++++++++++++++----- qml/Main.qml | 12 ++------ qml/images/Play_btn.png | Bin 0 -> 3046 bytes qml/images/particle_star2.png | Bin 0 -> 1178 bytes resources.qrc | 2 ++ screenshot/Main.qml | 10 +++++++ 9 files changed, 50 insertions(+), 84 deletions(-) create mode 100644 qml/images/Play_btn.png create mode 100644 qml/images/particle_star2.png diff --git a/qml/ApplicationIcon.qml b/qml/ApplicationIcon.qml index 7f8d5a3..1b9431e 100644 --- a/qml/ApplicationIcon.qml +++ b/qml/ApplicationIcon.qml @@ -88,68 +88,6 @@ Item { " } - ShaderEffect { - id: reflection - - width: shader.width - height: shader.height - - anchors.top: shader.bottom; - anchors.topMargin: height * 0.05; - - opacity: 0.4 - - property real x1: appIcon.x1; - property real x2: appIcon.x2 - appIcon.x1; - property real shift: appIcon.shift; - - visible: shader.visible - property variant source: shader.source - - mesh: "5x1" - - vertexShader: - " - attribute highp vec4 qt_Vertex; - attribute highp vec2 qt_MultiTexCoord0; - - uniform highp mat4 qt_Matrix; - uniform highp float x1; - uniform highp float x2; - uniform highp float shift; - - varying highp vec2 v_TexCoord; - varying float v_Opacity; - - void main() { - v_TexCoord = vec2(qt_MultiTexCoord0.x, 1.0 - qt_MultiTexCoord0.y); - highp float modShift = shift * sin(x1 + qt_MultiTexCoord0.x * x2); - gl_Position = qt_Matrix * (qt_Vertex - vec4(0, modShift, 0, 0)); - } - " - - fragmentShader: - " - uniform lowp float qt_Opacity; - uniform sampler2D source; - varying highp vec2 v_TexCoord; - void main() { - if (v_TexCoord.y < 0.3) - gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); - else - gl_FragColor = texture2D(source, v_TexCoord) * qt_Opacity * ( v_TexCoord.y - 0.3); - } - " - } - - Image { - id: playButton - source: "images/play.png" - anchors.centerIn: parent - opacity: appIcon.ListView.isCurrentItem ? 1 : 0 - Behavior on opacity { NumberAnimation { duration: 300 } } - } - MouseArea { id: mouse anchors.fill: parent diff --git a/qml/BootScreen.qml b/qml/BootScreen.qml index 647e5b7..4d57e26 100644 --- a/qml/BootScreen.qml +++ b/qml/BootScreen.qml @@ -67,7 +67,7 @@ Item { anchors.topMargin: engine.mm(4) anchors.horizontalCenter: logo.horizontalCenter font.pixelSize: engine.fontSize() * 1.2 - color: "white" + color: "black" text: "Boot to Qt" opacity: logo.opacity * 0.5 } @@ -114,10 +114,7 @@ Item { ImageParticle { id: starParticle - source: "images/particle_star.png" - color: "#ffffff" - alpha: 0 - colorVariation: 0 + source: "images/particle_star2.png" } Emitter { diff --git a/qml/GlimmeringQtLogo.qml b/qml/GlimmeringQtLogo.qml index 8220369..817b678 100644 --- a/qml/GlimmeringQtLogo.qml +++ b/qml/GlimmeringQtLogo.qml @@ -49,7 +49,7 @@ Item { ImageParticle { id: starParticle - source: "images/particle_star.png" + source: "images/particle_star2.png" color: "#ffffff" alpha: 0 colorVariation: 0 diff --git a/qml/LaunchScreen.qml b/qml/LaunchScreen.qml index 104ed68..efa303f 100644 --- a/qml/LaunchScreen.qml +++ b/qml/LaunchScreen.qml @@ -106,25 +106,50 @@ Item { } } + Image { + id: playButton + source: "images/Play_btn.png" + x: list.width/3.5 + y: list.cellHeight + engine.mm(2) + MouseArea { + id: mouse + anchors.fill: parent + onClicked: { + engine.launchApplication(applicationsModel.query(list.currentIndex, "location"), + applicationsModel.query(list.currentIndex, "mainFile"), + applicationsModel.query(list.currentIndex, "name")) + } + } + } + Text { + id: playText + text: "LAUNCH DEMO" + color: window.qtgreen + font.pixelSize: engine.fontSize() + anchors.verticalCenter: playButton.verticalCenter + anchors.left: playButton.right + anchors.leftMargin: engine.mm(4) + } + Text { id: nameLabel + x: playButton.x font.pixelSize: engine.fontSize() - color: "white" + color: "black" font.bold: true - anchors.horizontalCenter: parent.horizontalCenter; - y: list.cellHeight + engine.centimeter() * 0.5 + anchors.top: playButton.bottom + anchors.topMargin: engine.mm(4) wrapMode: Text.WordWrap } Text { id: descriptionLabel + width: list.cellWidth - engine.mm(4)//list.width/2.5 font.pixelSize: engine.smallFontSize() - color: "white" - anchors.left: parent.left - anchors.right: logo.left + color: "black" + x: playButton.x anchors.top: nameLabel.bottom anchors.bottom: parent.bottom - anchors.margins: engine.centimeter(); wrapMode: Text.WordWrap } diff --git a/qml/Main.qml b/qml/Main.qml index a5fece0..6b5d816 100644 --- a/qml/Main.qml +++ b/qml/Main.qml @@ -28,8 +28,8 @@ Window { width: qpa_platform == "wayland" ? 800 : Screen.desktopAvailableWidth height: qpa_platform == "wayland" ? 600 : Screen.desktopAvailableHeight - color: "black" - property color qtpurple: '#ae32a0' + color: "white" + property color qtgreen: '#80c342' Item { id: root @@ -335,16 +335,10 @@ Window { width: urlLabel.width height: urlLabel.height - Rectangle { - color: "black" - opacity: 0.7 - anchors.fill: urlLabel - } - Text { id: urlLabel; text: "http://www.qt.io/qt-for-device-creation" - color: qtpurple + color: qtgreen font.pixelSize: engine.sensibleButtonSize() * 0.2 font.bold: true } diff --git a/qml/images/Play_btn.png b/qml/images/Play_btn.png new file mode 100644 index 0000000..8949188 Binary files /dev/null and b/qml/images/Play_btn.png differ diff --git a/qml/images/particle_star2.png b/qml/images/particle_star2.png new file mode 100644 index 0000000..bb88c18 Binary files /dev/null and b/qml/images/particle_star2.png differ diff --git a/resources.qrc b/resources.qrc index b8b644d..ff656fa 100644 --- a/resources.qrc +++ b/resources.qrc @@ -13,5 +13,7 @@ qml/GlimmeringQtLogo.qml qml/HighlightShader.qml qml/images/play.png + qml/images/particle_star2.png + qml/images/Play_btn.png diff --git a/screenshot/Main.qml b/screenshot/Main.qml index 2c5b971..5849f17 100644 --- a/screenshot/Main.qml +++ b/screenshot/Main.qml @@ -161,10 +161,20 @@ Window Rectangle { id: blackOutLine anchors.fill: parent + anchors.margins: 3 color: "transparent" border.color: "black" border.width: 3 visible: !controls.visible } + Rectangle { + id: whiteOutLine + anchors.fill: parent + color: "transparent" + border.color: "white" + border.width: 3 + visible: !controls.visible + } + } -- cgit v1.2.3