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

63 lines
1.8 KiB
QML

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Controls.Validators 0.1
import utils 1.0
import "../stores"
Item {
id: root
property AddAccountStore store
implicitHeight: layout.implicitHeight
ColumnLayout {
id: layout
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width - 2 * Theme.padding
spacing: Theme.halfPadding
StatusInput {
objectName: "AddAccountPopup-GeneratedSeedPhraseKeyName"
Layout.preferredWidth: parent.width
Layout.topMargin: Theme.padding
label: qsTr("Key name")
charLimit: Constants.addAccountPopup.keyPairNameMaxLength
placeholderText: qsTr("Enter a name")
text: root.store.addAccountModule.newKeyPairName
onTextChanged: {
if (text.trim() == "") {
root.store.addAccountModule.newKeyPairName = ""
return
}
root.store.addAccountModule.newKeyPairName = text
}
onKeyPressed: {
root.store.submitPopup(event)
}
validators: [
StatusMinLengthValidator {
errorMessage: qsTr("Key pair name must be at least %n character(s)", "", Constants.addAccountPopup.keyPairAccountNameMinLength)
minLength: Constants.addAccountPopup.keyPairAccountNameMinLength
}
]
}
StatusBaseText {
text: qsTr("For your future reference. This is only visible to you.")
font.pixelSize: Constants.addAccountPopup.labelFontSize2
color: Theme.palette.baseColor1
}
}
}