status-desktop/ui/onboarding/GenKeyModal.qml
emizzle 2c9d042152 fix: Support dark mode for onboarding screens
Related to #599.

![Imgur](https://imgur.com/vKTadPM.png)
![Imgur](https://imgur.com/PHMzGxC.png)

This PR is based off of #1036, which supports system colors at app startup, meaning the onboarding screens may be in dark mode, if the user has their system set to dark mode. This PR fixes the onboarding screens so they support dark mode.

It also:
1. Adds radio buttons to the `AccountList` component, as per the design
2. Adds `qsTr` where missing on the onboarding screens
3. Fixes some minor design issues
4. Updates the modals titles to match the design
5.  Uses reusable Status components where possible. `EnterSeedPhraseModal` and `GenKeyModal` could have used the `StatusRoundButton` component, but there were some limitations that preventing this from being possible.
2020-09-29 13:30:33 -04:00

70 lines
1.7 KiB
QML

import QtQuick 2.13
import QtQuick.Controls 2.13
import QtGraphicalEffects 1.13
import "../imports"
import "../shared"
import "../shared/status"
import "./Login"
ModalPopup {
property int selectedIndex: 0
property var onClosed: function () {}
property var onNextClick: function () {}
id: popup
//% "Choose a chat name"
title: qsTrId("intro-wizard-title2")
AccountList {
id: accountList
anchors.fill: parent
interactive: false
accounts: onboardingModel
isSelected: function (index, address) {
return index === selectedIndex
}
onAccountSelect: function(index) {
selectedIndex = index
}
}
footer: Button {
id: submitBtn
anchors.bottom: parent.bottom
anchors.topMargin: Style.current.padding
anchors.right: parent.right
width: 44
height: 44
background: Rectangle {
radius: 50
color: Style.current.buttonBackgroundColor
}
SVGImage {
sourceSize.height: 15
sourceSize.width: 20
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
source: "../app/img/arrow-right.svg"
fillMode: Image.PreserveAspectFit
ColorOverlay {
anchors.fill: parent
source: parent
color: Style.current.buttonForegroundColor
antialiasing: true
}
}
onClicked : {
onNextClick(selectedIndex);
popup.close()
}
}
}
/*##^##
Designer {
D{i:0;formeditorColor:"#ffffff";height:500;width:400}
}
##^##*/