Lukáš Tinkl d9d6d90dc9 [Style] remove legacy Style and its themes
- legacy Style and ThemePalette removed
- moved and deduplicated font definitions into `Theme` (unrelated to a
color palette)
- `Style.current.foo` -> `Theme.foo`
- `Style.current.fooColor` -> `Theme.palette.fooColor`
- upgrade the imports to 5.15
- removed some mode dead components

Fixes #16514
2024-10-22 15:54:31 +02:00

74 lines
2.3 KiB
QML

import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Components 0.1
import StatusQ.Controls 0.1
import utils 1.0
import shared.panels 1.0 as SharedPanels
Item {
id: root
property var sharedKeycardModule
property alias seedPhraseRevealed: displaySeed.seedPhraseRevealed
ColumnLayout {
anchors.fill: parent
anchors.topMargin: Theme.xlPadding
anchors.bottomMargin: Theme.halfPadding
anchors.leftMargin: Theme.xlPadding
anchors.rightMargin: Theme.xlPadding
spacing: Theme.padding
StatusBaseText {
id: title
Layout.preferredHeight: Constants.keycard.general.titleHeight
Layout.alignment: Qt.AlignCenter
wrapMode: Text.WordWrap
}
StatusBaseText {
id: message
Layout.preferredHeight: Constants.keycard.general.messageHeight
Layout.alignment: Qt.AlignCenter
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
}
SharedPanels.SeedPhrase {
id: displaySeed
Layout.preferredWidth: parent.width
Layout.fillHeight: true
property var seedPhrase: root.sharedKeycardModule.getMnemonic().split(" ")
}
}
states: [
State {
name: Constants.keycardSharedState.seedPhraseDisplay
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.seedPhraseDisplay
PropertyChanges {
target: title
text: qsTr("Write down your seed phrase")
font.pixelSize: Constants.keycard.general.fontSize1
font.weight: Font.Bold
color: Theme.palette.directColor1
}
PropertyChanges {
target: message
text: qsTr("The next screen contains your seed phrase.<br/><b>Anyone</b> who sees it can use it to access to your funds.")
font.pixelSize: Constants.keycard.general.fontSize2
wrapMode: Text.WordWrap
textFormat: Text.RichText
color: Theme.palette.dangerColor1
}
}
]
}