update intro and keys screen to use dark theme setttings correctly

This commit is contained in:
Iuri Matias 2020-12-10 16:26:39 -05:00
parent d20f5a55eb
commit 334d538700
2 changed files with 14 additions and 6 deletions

View File

@ -1,6 +1,7 @@
import QtQuick 2.13 import QtQuick 2.13
import QtQuick.Controls 2.13 import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13 import QtQuick.Layouts 1.13
import QtQuick.Controls.Universal 2.12
import "../shared" import "../shared"
import "../shared/status" import "../shared/status"
import "../imports" import "../imports"
@ -18,6 +19,7 @@ RowLayout {
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
color: Style.current.background
SwipeView { SwipeView {
id: vwOnboarding id: vwOnboarding
@ -28,7 +30,7 @@ RowLayout {
anchors.fill: parent anchors.fill: parent
Slide { Slide {
image: "img/chat@2x.jpg" image: Universal.theme === Universal.Dark ? "img/chat-dark@2x.jpg" : "img/chat@2x.jpg"
//% "Truly private communication" //% "Truly private communication"
title: qsTrId("intro-title1") title: qsTrId("intro-title1")
//% "Chat over a peer-to-peer, encrypted network\n where messages can't be censored or hacked" //% "Chat over a peer-to-peer, encrypted network\n where messages can't be censored or hacked"
@ -36,14 +38,14 @@ RowLayout {
isFirst: true isFirst: true
} }
Slide { Slide {
image: "img/wallet@2x.jpg" image: Universal.theme === Universal.Dark ? "img/wallet-dark@2x.jpg" : "img/wallet@2x.jpg"
//% "Secure crypto wallet" //% "Secure crypto wallet"
title: qsTrId("intro-title2") title: qsTrId("intro-title2")
//% "Send and receive digital assets anywhere in the\nworld--no bank account required" //% "Send and receive digital assets anywhere in the\nworld--no bank account required"
description: qsTrId("send-and-receive-digital-assets-anywhere-in-the-nworld--no-bank-account-required") description: qsTrId("send-and-receive-digital-assets-anywhere-in-the-nworld--no-bank-account-required")
} }
Slide { Slide {
image: "img/browser@2x.jpg" image: Universal.theme === Universal.Dark ? "img/browser-dark@2x.jpg" : "img/browser@2x.jpg"
//% "Decentralized apps" //% "Decentralized apps"
title: qsTrId("intro-title3") title: qsTrId("intro-title3")
//% "Explore games, exchanges and social networks\nwhere you alone own your data" //% "Explore games, exchanges and social networks\nwhere you alone own your data"
@ -61,6 +63,7 @@ RowLayout {
anchors.topMargin: 567 anchors.topMargin: 567
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: parent.width width: parent.width
color: Style.current.background
PageIndicator { PageIndicator {
id: pgOnboarding id: pgOnboarding
@ -104,7 +107,7 @@ RowLayout {
StyledButton { StyledButton {
id: btnGetStarted id: btnGetStarted
enabled: warningCheckBox.checked enabled: warningCheckBox.checked
btnColor: this.enabled ? Style.current.lightBlue : "lightgrey" btnColor: this.enabled ? Style.current.secondaryBackground : "lightgrey"
label: "Get Started" label: "Get Started"
anchors.top: warningCheckBox.bottom anchors.top: warningCheckBox.bottom
anchors.topMargin: 5 anchors.topMargin: 5

View File

@ -1,5 +1,6 @@
import QtQuick 2.13 import QtQuick 2.13
import QtQuick.Controls 2.13 import QtQuick.Controls 2.13
import QtQuick.Controls.Universal 2.12
import "../shared" import "../shared"
import "../imports" import "../imports"
@ -7,7 +8,11 @@ Page {
id: page id: page
property alias btnExistingKey: btnExistingKey property alias btnExistingKey: btnExistingKey
property alias btnGenKey: btnGenKey property alias btnGenKey: btnGenKey
background: Rectangle {
color: Style.current.background
}
Item { Item {
id: container id: container
width: 425 width: 425
@ -29,7 +34,7 @@ Page {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top anchors.top: parent.top
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
source: "img/keys@2x.jpg" source: Universal.theme === Universal.Dark ? "img/keys-dark@2x.jpg" : "img/keys@2x.jpg"
} }
StyledText { StyledText {