diff --git a/storybook/pages/ConfirmAddingNewMasterKeyPage.qml b/storybook/pages/ConfirmAddingNewMasterKeyPage.qml new file mode 100644 index 00000000000..6dff1b599b5 --- /dev/null +++ b/storybook/pages/ConfirmAddingNewMasterKeyPage.qml @@ -0,0 +1,24 @@ +import QtQuick +import QtQuick.Controls + +import shared.popups.addaccount.states + +Item { + id: root + + ConfirmAddingNewMasterKey { + id: confirmAddingNewMasterKey + anchors.fill: parent + } + + Label { + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.margins: 10 + + text: "All accepted: " + confirmAddingNewMasterKey.allAccepted + } +} + +// category: Controls +// status: good diff --git a/storybook/pages/StatusStepperPage.qml b/storybook/pages/StatusStepperPage.qml index 7c80acca49e..dbff94e4fe6 100644 --- a/storybook/pages/StatusStepperPage.qml +++ b/storybook/pages/StatusStepperPage.qml @@ -1,15 +1,16 @@ import QtQuick import QtQuick.Controls +import QtQuick.Layouts -import StatusQ.Core import StatusQ.Components -import StatusQ.Core.Theme Item { id: root - Column { - anchors.centerIn: parent + ColumnLayout { + anchors.fill: parent + anchors.margins: 50 + spacing: 30 Grid { @@ -43,10 +44,21 @@ Item { StatusStepper { id: stepper - width: 400 + + Layout.fillWidth: true title: "Account %1 of %2".arg(completedSteps).arg(totalSteps) totalSteps: ctrlTotalSteps.value completedSteps: ctrlCompletedSteps.value + + Rectangle { + anchors.fill: parent + color: "transparent" + border.color: "lightgray" + } + } + + Item { + Layout.fillHeight: true } } } diff --git a/ui/StatusQ/src/StatusQ/Components/StatusStepper.qml b/ui/StatusQ/src/StatusQ/Components/StatusStepper.qml index 633a371197a..e00a2784bbd 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusStepper.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusStepper.qml @@ -1,5 +1,6 @@ import QtQuick import QtQuick.Controls +import QtQuick.Layouts import StatusQ.Core import StatusQ.Core.Theme @@ -9,8 +10,8 @@ import StatusQ.Core.Theme \inherits Item \inqmlmodule StatusQ.Components \since StatusQ.Components 0.1 - \brief Displays total number of steps which need to be passed, marking each completed step - based on `completedSteps` property + \brief Displays total number of steps which need to be passed, marking each + completed step based on `completedSteps` property Example: @@ -28,57 +29,52 @@ import StatusQ.Core.Theme For a list of components available see StatusQ. */ -Item { +Control { id: root property alias title: title.text - property int titleFontSize: Theme.tertiaryTextFontSize - property color titleColor: Theme.palette.baseColor1 property int totalSteps: 1 property int completedSteps: 1 - property color completedStepColor: Theme.palette.primaryColor1 - property color uncompletedStepColor: Theme.palette.baseColor2 - property int leftPadding: 24 - property int rightPadding: 24 - implicitHeight: 52 + horizontalPadding: Theme.bigPadding + verticalPadding: Theme.padding QtObject { id: d readonly property int stepHeight: 4 - readonly property int stepRadius: 4 readonly property int spaceBetweenSteps: 2 } - Column { - anchors.fill: parent - anchors.leftMargin: root.leftPadding - anchors.rightMargin: root.rightPadding + contentItem: ColumnLayout { spacing: 8 StatusBaseText { id: title - width: parent.width + + Layout.fillWidth: true horizontalAlignment: Qt.AlignHCenter - color: root.titleColor - font.pixelSize: root.titleFontSize + color: Theme.palette.baseColor1 + wrapMode: Text.Wrap } - Row { - width: parent.width + RowLayout { spacing: d.spaceBetweenSteps + uniformCellSizes: true Repeater { id: repeater model: root.totalSteps delegate: Rectangle { - readonly property int stepIndex: index - width: (parent.width - (root.totalSteps - 1) * d.spaceBetweenSteps) / root.totalSteps - height: d.stepHeight - radius: d.stepRadius - color: stepIndex < root.completedSteps? root.completedStepColor : root.uncompletedStepColor + required property int index + + Layout.fillWidth: true + Layout.preferredHeight: d.stepHeight + + radius: d.stepHeight / 2 + color: index < root.completedSteps ? root.Theme.palette.primaryColor1 + : root.Theme.palette.baseColor2 } } } diff --git a/ui/app/AppLayouts/Communities/panels/SharedAddressesSigningPanel.qml b/ui/app/AppLayouts/Communities/panels/SharedAddressesSigningPanel.qml index f9ba36982b2..db8d464ddc6 100644 --- a/ui/app/AppLayouts/Communities/panels/SharedAddressesSigningPanel.qml +++ b/ui/app/AppLayouts/Communities/panels/SharedAddressesSigningPanel.qml @@ -85,7 +85,6 @@ ColumnLayout { StatusBaseText { Layout.preferredWidth: parent.width elide: Text.ElideRight - font.pixelSize: Constants.keycard.general.fontSize2 text: qsTr("To share %n address(s) with %1, authenticate the associated key pairs...", "", d.selectedSharedAddressesCount).arg(root.communityName) } @@ -97,8 +96,6 @@ ColumnLayout { StatusBaseText { Layout.fillWidth: true text: qsTr("Stored on device") - font.pixelSize: Constants.keycard.general.fontSize2 - color: Theme.palette.baseColor1 wrapMode: Text.WordWrap } } @@ -191,7 +188,6 @@ ColumnLayout { StatusBaseText { text: qsTr("Stored on keycard") - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.baseColor1 wrapMode: Text.WordWrap } @@ -294,7 +290,6 @@ ColumnLayout { d.thereAreMoreThanOneNonProfileRegularKeypairs? qsTr("Authenticate via “%1” key pair").arg(userProfile.name) : qsTr("The following key pairs will be authenticated via “%1” key pair").arg(userProfile.name) - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.baseColor1 wrapMode: Text.WrapAnywhere } diff --git a/ui/app/AppLayouts/Profile/ProfileLayout.qml b/ui/app/AppLayouts/Profile/ProfileLayout.qml index 29b9402bb04..6eaecb71251 100644 --- a/ui/app/AppLayouts/Profile/ProfileLayout.qml +++ b/ui/app/AppLayouts/Profile/ProfileLayout.qml @@ -201,8 +201,8 @@ StatusSectionLayout { readonly property var currentItem: (currentIndex >= 0 && currentIndex < children.length) ? children[currentIndex].item : null anchors.fill: parent - anchors.leftMargin: Constants.settingsSection.leftMargin - anchors.rightMargin: Constants.settingsSection.rightMargin + anchors.leftMargin: root.Theme.xlPadding * 2 + anchors.rightMargin: root.Theme.xlPadding * 2 currentIndex: leftPanel.settingsSubsection onCurrentIndexChanged: { @@ -694,7 +694,6 @@ StatusSectionLayout { StatusBaseText { anchors.fill: parent - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.directColor1 text: qsTr("The Keycard module is still busy, please try again") } diff --git a/ui/app/AppLayouts/Profile/views/NotificationsView.qml b/ui/app/AppLayouts/Profile/views/NotificationsView.qml index faf511a08d2..bf6bde70124 100644 --- a/ui/app/AppLayouts/Profile/views/NotificationsView.qml +++ b/ui/app/AppLayouts/Profile/views/NotificationsView.qml @@ -27,6 +27,10 @@ SettingsContentBase { QtObject { id: d + readonly property int infoFontSize: root.Theme.primaryTextFontSize + readonly property int infoLineHeight: 22 + readonly property int infoSpacing: 5 + readonly property var notificationsSettings: root.notificationsStore.notificationsSettings } @@ -166,13 +170,13 @@ SettingsContentBase { anchors.left: parent.left anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter - spacing: Constants.settingsSection.infoSpacing + spacing: d.infoSpacing StatusBaseText { Layout.preferredWidth: parent.width text: qsTr("Enable Notifications in macOS Settings") - font.pixelSize: Constants.settingsSection.infoFontSize - lineHeight: Constants.settingsSection.infoLineHeight + font.pixelSize: d.infoFontSize + lineHeight: d.infoLineHeight lineHeightMode: Text.FixedHeight color: Theme.palette.primaryColor1 } @@ -180,8 +184,8 @@ SettingsContentBase { StatusBaseText { Layout.preferredWidth: parent.width text: qsTr("To receive Status notifications, make sure you've enabled them in your computer's settings under System Preferences > Notifications") - font.pixelSize: Constants.settingsSection.infoFontSize - lineHeight: Constants.settingsSection.infoLineHeight + font.pixelSize: d.infoFontSize + lineHeight: d.infoLineHeight lineHeightMode: Text.FixedHeight color: Theme.palette.baseColor1 wrapMode: Text.WordWrap @@ -210,7 +214,6 @@ SettingsContentBase { Layout.preferredWidth: root.contentWidth Layout.leftMargin: Theme.padding text: qsTr("Messages") - font.pixelSize: Constants.settingsSection.subHeaderFontSize color: Theme.palette.baseColor1 } @@ -285,7 +288,6 @@ SettingsContentBase { Layout.preferredWidth: root.contentWidth Layout.leftMargin: Theme.padding text: qsTr("Others") - font.pixelSize: Constants.settingsSection.subHeaderFontSize color: Theme.palette.baseColor1 } @@ -331,7 +333,6 @@ SettingsContentBase { Layout.preferredWidth: root.contentWidth Layout.leftMargin: Theme.padding text: qsTr("Notification Content") - font.pixelSize: Constants.settingsSection.subHeaderFontSize color: Theme.palette.directColor1 } @@ -409,7 +410,6 @@ SettingsContentBase { Layout.preferredWidth: root.contentWidth Layout.leftMargin: Theme.padding text: qsTr("Volume") - font.pixelSize: Constants.settingsSection.subHeaderFontSize color: Theme.palette.directColor1 } @@ -482,7 +482,6 @@ SettingsContentBase { Layout.preferredWidth: root.contentWidth Layout.leftMargin: Theme.padding text: qsTr("Exemptions") - font.pixelSize: Constants.settingsSection.subHeaderFontSize color: Theme.palette.directColor1 } @@ -498,7 +497,6 @@ SettingsContentBase { Layout.preferredWidth: root.contentWidth Layout.leftMargin: Theme.padding text: qsTr("Most recent") - font.pixelSize: Constants.settingsSection.subHeaderFontSize color: Theme.palette.baseColor1 } diff --git a/ui/app/AppLayouts/Profile/views/SettingsContentBase.qml b/ui/app/AppLayouts/Profile/views/SettingsContentBase.qml index 06a303477c9..bb966b1f7fe 100644 --- a/ui/app/AppLayouts/Profile/views/SettingsContentBase.qml +++ b/ui/app/AppLayouts/Profile/views/SettingsContentBase.qml @@ -99,7 +99,7 @@ FocusScope { Layout.fillWidth: !root.stickTitleRowComponentLoader text: root.sectionTitle font.weight: Font.Bold - font.pixelSize: Constants.settingsSection.mainHeaderFontSize + font.pixelSize: root.Theme.fontSize(28) // Keep as is - special case for main header color: Theme.palette.directColor1 elide: Text.ElideRight @@ -182,16 +182,10 @@ FocusScope { SettingsDirtyToastMessage { id: settingsDirtyToastMessage + anchors.bottom: scrollView.bottom anchors.bottomMargin: d.bottomDirtyToastMargin - - // Left anchors and margin added bc of the implementation of the `SettingsContentBase` parent margin and to avoid - // this toast to be wrongly centered - // Constants.settingsSection.leftMargin is the margin set up to the parent when using `SettingsContentBase` inside central - // panel property of `StatusSectionLayout` and needs to be taken into account to counteract it - // when trying to align horizontally the save toast component - anchors.left: root.left - anchors.leftMargin: -Constants.settingsSection.leftMargin / 2 + (root.width / 2 - width / 2) + anchors.horizontalCenter: parent.horizontalCenter active: root.dirty flickable: root.autoscrollWhenDirty ? scrollView.flickable : null diff --git a/ui/app/AppLayouts/Profile/views/SyncingView.qml b/ui/app/AppLayouts/Profile/views/SyncingView.qml index 68260d4238b..964b7bc4e37 100644 --- a/ui/app/AppLayouts/Profile/views/SyncingView.qml +++ b/ui/app/AppLayouts/Profile/views/SyncingView.qml @@ -84,7 +84,6 @@ SettingsContentBase { Layout.leftMargin: Theme.padding Layout.rightMargin: Theme.padding text: qsTr("Devices") - font.pixelSize: Constants.settingsSection.subHeaderFontSize color: Theme.palette.baseColor1 } diff --git a/ui/app/AppLayouts/Profile/views/keycard/MainView.qml b/ui/app/AppLayouts/Profile/views/keycard/MainView.qml index 7c452bc4da9..24387ec1aa2 100644 --- a/ui/app/AppLayouts/Profile/views/keycard/MainView.qml +++ b/ui/app/AppLayouts/Profile/views/keycard/MainView.qml @@ -53,7 +53,7 @@ ColumnLayout { StyledText { visible: d.noKeycardsSet Layout.alignment: Qt.AlignCenter - font.pixelSize: Constants.settingsSection.importantInfoFontSize + font.pixelSize: Theme.fontSize(18) color: Theme.palette.directColor1 text: qsTr("Secure your funds. Keep your profile safe.") } @@ -236,7 +236,6 @@ ColumnLayout { StatusBaseText { anchors.fill: parent - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.directColor1 text: dialog.accountsWarning? Constants.walletConstants.maxNumberOfAccountsContent : Constants.walletConstants.maxNumberOfKeypairsContent } diff --git a/ui/app/AppLayouts/Wallet/popups/AddEditSavedAddressPopup.qml b/ui/app/AppLayouts/Wallet/popups/AddEditSavedAddressPopup.qml index 6c3dc1ffce2..8ed021f210a 100644 --- a/ui/app/AppLayouts/Wallet/popups/AddEditSavedAddressPopup.qml +++ b/ui/app/AppLayouts/Wallet/popups/AddEditSavedAddressPopup.qml @@ -524,7 +524,6 @@ StatusDialog { anchors.horizontalCenter: parent.horizontalCenter model: Theme.palette.customisationColorsArray title.color: Theme.palette.directColor1 - title.font.pixelSize: Constants.addAccountPopup.labelFontSize1 title.text: qsTr("Colour") selectedColorIndex: -1 diff --git a/ui/imports/shared/popups/addaccount/AddAccountPopup.qml b/ui/imports/shared/popups/addaccount/AddAccountPopup.qml index c23453641de..e67c99d0e2f 100644 --- a/ui/imports/shared/popups/addaccount/AddAccountPopup.qml +++ b/ui/imports/shared/popups/addaccount/AddAccountPopup.qml @@ -164,8 +164,14 @@ StatusModal { Component { id: confirmAddingNewMasterKeyComponent ConfirmAddingNewMasterKey { - height: Constants.addAccountPopup.contentHeight1 - store: root.store + onAllAcceptedChanged: { + root.store.addingNewMasterKeyConfirmed = allAccepted + } + + Component.onCompleted: { + if (root.store.addingNewMasterKeyConfirmed) + setAllAccepted() + } } } diff --git a/ui/imports/shared/popups/addaccount/panels/AccountAddressSelection.qml b/ui/imports/shared/popups/addaccount/panels/AccountAddressSelection.qml index af31a0aa51e..2f01af8993c 100644 --- a/ui/imports/shared/popups/addaccount/panels/AccountAddressSelection.qml +++ b/ui/imports/shared/popups/addaccount/panels/AccountAddressSelection.qml @@ -64,7 +64,6 @@ StatusMenu { StatusLinkText { visible: !root.store.addAccountModule.scanningForActivityIsOngoing - font.pixelSize: Constants.addAccountPopup.labelFontSize1 text: qsTr("Scan addresses for activity") color: Theme.palette.primaryColor1 onClicked: { @@ -81,7 +80,6 @@ StatusMenu { visible: root.store.addAccountModule.scanningForActivityIsOngoing color: root.store.derivedAddressModel.loadedCount === 0? Theme.palette.baseColor1 : Theme.palette.successColor1 - font.pixelSize: Constants.addAccountPopup.labelFontSize1 text: root.store.derivedAddressModel.loadedCount === 0? qsTr("Scanning for activity...") : qsTr("Activity fetched for %1 / %2 addresses").arg(root.store.derivedAddressModel.loadedCount).arg(root.store.derivedAddressModel.count) @@ -136,7 +134,6 @@ StatusMenu { elide: Text.ElideMiddle color: model.addressDetails.alreadyCreated ? Theme.palette.baseColor1 : Theme.palette.directColor1 - font.pixelSize: Constants.addAccountPopup.labelFontSize1 text: model.addressDetails.address } @@ -149,7 +146,6 @@ StatusMenu { } StatusTextWithLoadingState { - font.pixelSize: Constants.addAccountPopup.labelFontSize1 text: { if (!root.store.addAccountModule.scanningForActivityIsOngoing) { return "" @@ -180,7 +176,6 @@ StatusMenu { StatusBaseText { color: Theme.palette.baseColor1 - font.pixelSize: Constants.addAccountPopup.labelFontSize1 text: model.addressDetails.order } diff --git a/ui/imports/shared/popups/addaccount/panels/DerivationPath.qml b/ui/imports/shared/popups/addaccount/panels/DerivationPath.qml index c8a80accc94..c4e944a35dc 100644 --- a/ui/imports/shared/popups/addaccount/panels/DerivationPath.qml +++ b/ui/imports/shared/popups/addaccount/panels/DerivationPath.qml @@ -29,7 +29,6 @@ GridLayout { StatusBaseText { Layout.fillWidth: true - font.pixelSize: Constants.addAccountPopup.labelFontSize1 text: qsTr("Derivation Path") } @@ -38,7 +37,6 @@ GridLayout { enabled: !root.store.selectedOrigin.migratedToKeycard && root.store.derivedAddressModel.count > 0 && root.store.addAccountModule.suggestedDerivationPath !== root.store.addAccountModule.derivationPath - font.pixelSize: Constants.addAccountPopup.labelFontSize1 text: qsTr("Reset") color: enabled? Theme.palette.primaryColor1 : Theme.palette.baseColor1 @@ -49,7 +47,6 @@ GridLayout { StatusBaseText { Layout.preferredWidth: d.oneHalfWidth - font.pixelSize: Constants.addAccountPopup.labelFontSize1 text: qsTr("Account") } @@ -187,7 +184,7 @@ GridLayout { Layout.fillWidth: true visible: !errorMessageText.visible && !warningMessageText.visible - font.pixelSize: Constants.addAccountPopup.labelFontSize2 + font.pixelSize: Theme.additionalTextSize color: Theme.palette.baseColor1 text: root.store.translation(root.store.selectedRootPath, true) } @@ -227,7 +224,6 @@ GridLayout { visible: root.store.derivationPathOutOfTheDefaultStatusDerivationTree Layout.fillWidth: true Layout.columnSpan: 3 - font.pixelSize: Constants.addAccountPopup.labelFontSize1 text: qsTr("I understand that this non-Ethereum derivation path is incompatible with Keycard") onToggled: { root.store.derivationPathOutOfTheDefaultStatusDerivationTreeConfirmed = checked diff --git a/ui/imports/shared/popups/addaccount/panels/DerivationPathDisplay.qml b/ui/imports/shared/popups/addaccount/panels/DerivationPathDisplay.qml index 8c221095f25..f0818b72d5b 100644 --- a/ui/imports/shared/popups/addaccount/panels/DerivationPathDisplay.qml +++ b/ui/imports/shared/popups/addaccount/panels/DerivationPathDisplay.qml @@ -42,13 +42,11 @@ GridLayout { StatusBaseText { Layout.fillWidth: true - font.pixelSize: Constants.addAccountPopup.labelFontSize1 text: qsTr("Derivation Path") } StatusBaseText { Layout.preferredWidth: d.oneHalfWidth - font.pixelSize: Constants.addAccountPopup.labelFontSize1 text: qsTr("Account") } @@ -66,7 +64,7 @@ GridLayout { StatusBaseText { Layout.preferredWidth: d.oneHalfWidth - font.pixelSize: Constants.addAccountPopup.labelFontSize2 + font.pixelSize: Theme.additionalTextSize color: Theme.palette.baseColor1 text: { if (root.store.addAccountModule.derivationPath.startsWith(Constants.addAccountPopup.predefinedPaths.ethereum)) { diff --git a/ui/imports/shared/popups/addaccount/panels/DerivationPathSection.qml b/ui/imports/shared/popups/addaccount/panels/DerivationPathSection.qml index dd73a6c71ff..502038545c7 100644 --- a/ui/imports/shared/popups/addaccount/panels/DerivationPathSection.qml +++ b/ui/imports/shared/popups/addaccount/panels/DerivationPathSection.qml @@ -37,7 +37,6 @@ Column { visible: !root.store.editMode StatusBaseText { - font.pixelSize: Constants.addAccountPopup.labelFontSize1 textFormat: Text.RichText text: { let t = qsTr("Derivation path") diff --git a/ui/imports/shared/popups/addaccount/states/ConfirmAddingNewMasterKey.qml b/ui/imports/shared/popups/addaccount/states/ConfirmAddingNewMasterKey.qml index f288acb7763..52a8c70ebc2 100644 --- a/ui/imports/shared/popups/addaccount/states/ConfirmAddingNewMasterKey.qml +++ b/ui/imports/shared/popups/addaccount/states/ConfirmAddingNewMasterKey.qml @@ -6,57 +6,46 @@ import StatusQ.Controls import StatusQ.Core.Theme import StatusQ.Core -import utils -import "../stores" - -Item { +Control { id: root - property AddAccountStore store - - implicitHeight: layout.implicitHeight + padding: Theme.padding - Component.onCompleted: { - if (root.store.addingNewMasterKeyConfirmed) { - havePen.checked = true - writeDown.checked = true - storeIt.checked = true - } + readonly property bool allAccepted: havePen.checked && + writeDown.checked && + storeIt.checked + function setAllAccepted() { + havePen.checked = true + writeDown.checked = true + storeIt.checked = true } QtObject { id: d - readonly property int width1: layout.width - 2 * Theme.padding - readonly property int width2: d.width1 - 2 * Theme.padding - readonly property int checkboxHeight: 24 - readonly property real lineHeight: 1.2 - readonly property bool allAccepted: havePen.checked && writeDown.checked && storeIt.checked - onAllAcceptedChanged: { - root.store.addingNewMasterKeyConfirmed = allAccepted - } + readonly property real lineHeight: 1.2 } - ColumnLayout { + contentItem: ColumnLayout { id: layout - anchors.horizontalCenter: parent.horizontalCenter - width: parent.width - 2 * Theme.padding - spacing: Theme.padding + + spacing: root.Theme.padding Image { Layout.alignment: Qt.AlignHCenter Layout.topMargin: Theme.padding Layout.preferredWidth: 120 Layout.preferredHeight: 120 + + sourceSize: Qt.size(width, height) fillMode: Image.PreserveAspectFit source: Assets.png("onboarding/keys") - mipmap: true - cache: false } StatusBaseText { - Layout.preferredWidth: d.width1 + Layout.fillWidth: true + Layout.alignment: Qt.AlignHCenter horizontalAlignment: Text.AlignHCenter wrapMode: Text.WordWrap @@ -66,7 +55,8 @@ Item { } StatusBaseText { - Layout.preferredWidth: d.width1 + Layout.fillWidth: true + Layout.alignment: Qt.AlignHCenter horizontalAlignment: Text.AlignHCenter wrapMode: Text.WordWrap @@ -78,11 +68,14 @@ Item { StatusCheckBox { id: havePen + objectName: "AddAccountPopup-HavePenAndPaper" - Layout.preferredWidth: d.width2 - Layout.preferredHeight: d.checkboxHeight + + Layout.fillWidth: true + Layout.leftMargin: Theme.xlPadding Layout.topMargin: Theme.padding Layout.alignment: Qt.AlignHCenter + spacing: Theme.padding font.pixelSize: Theme.primaryTextFontSize text: qsTr("I have a pen and paper") @@ -90,10 +83,12 @@ Item { StatusCheckBox { id: writeDown - objectName: "AddAccountPopup-SeedPhraseWritten" - Layout.preferredWidth: d.width2 - Layout.preferredHeight: d.checkboxHeight + + Layout.fillWidth: true + Layout.leftMargin: Theme.xlPadding Layout.alignment: Qt.AlignHCenter + + objectName: "AddAccountPopup-SeedPhraseWritten" spacing: Theme.padding font.pixelSize: Theme.primaryTextFontSize text: qsTr("I am ready to write down my recovery phrase") @@ -101,25 +96,31 @@ Item { StatusCheckBox { id: storeIt - objectName: "AddAccountPopup-StoringSeedPhraseConfirmed" - Layout.preferredWidth: d.width2 - Layout.preferredHeight: d.checkboxHeight + + Layout.fillWidth: true + Layout.leftMargin: Theme.xlPadding Layout.alignment: Qt.AlignHCenter + + objectName: "AddAccountPopup-StoringSeedPhraseConfirmed" spacing: Theme.padding font.pixelSize: Theme.primaryTextFontSize text: qsTr("I know where I’ll store it") } - Rectangle { + Control { Layout.fillWidth: true - Layout.preferredHeight: 60 - Layout.topMargin: Theme.padding - radius: Theme.radius - color: Theme.palette.dangerColor3 + Layout.maximumWidth: implicitWidth + Layout.alignment: Qt.AlignHCenter + Layout.topMargin: root.Theme.padding + + padding: root.Theme.padding - StatusBaseText { - anchors.fill: parent - anchors.margins: Theme.halfPadding + background: Rectangle { + radius: root.Theme.radius + color: root.Theme.palette.dangerColor3 + } + + contentItem: StatusBaseText { horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter font.pixelSize: Theme.primaryTextFontSize @@ -129,5 +130,9 @@ Item { text: qsTr("You can only complete this process once. Status will not store your recovery phrase and can never help you recover it.") } } + + Item { + Layout.fillHeight: true + } } } diff --git a/ui/imports/shared/popups/addaccount/states/ConfirmSeedPhraseBackup.qml b/ui/imports/shared/popups/addaccount/states/ConfirmSeedPhraseBackup.qml index a745680875b..78ca3a64347 100644 --- a/ui/imports/shared/popups/addaccount/states/ConfirmSeedPhraseBackup.qml +++ b/ui/imports/shared/popups/addaccount/states/ConfirmSeedPhraseBackup.qml @@ -32,11 +32,9 @@ Item { StatusStepper { Layout.preferredWidth: Constants.addAccountPopup.stepperWidth - Layout.preferredHeight: Constants.addAccountPopup.stepperHeight Layout.topMargin: Theme.padding Layout.alignment: Qt.AlignCenter title: qsTr("Step 4 of 4") - titleFontSize: Constants.addAccountPopup.labelFontSize1 totalSteps: 4 completedSteps: 4 leftPadding: 0 @@ -47,7 +45,6 @@ Item { Layout.preferredWidth: parent.width Layout.alignment: Qt.AlignCenter horizontalAlignment: Text.AlignHCenter - font.pixelSize: Constants.addAccountPopup.labelFontSize1 color: Theme.palette.directColor1 text: qsTr("Complete back up") } diff --git a/ui/imports/shared/popups/addaccount/states/DisplaySeedPhrase.qml b/ui/imports/shared/popups/addaccount/states/DisplaySeedPhrase.qml index 8621a25912d..7369b4aa1bd 100644 --- a/ui/imports/shared/popups/addaccount/states/DisplaySeedPhrase.qml +++ b/ui/imports/shared/popups/addaccount/states/DisplaySeedPhrase.qml @@ -26,11 +26,9 @@ Item { StatusStepper { Layout.preferredWidth: Constants.addAccountPopup.stepperWidth - Layout.preferredHeight: Constants.addAccountPopup.stepperHeight Layout.topMargin: Theme.padding Layout.alignment: Qt.AlignCenter title: qsTr("Step 1 of 4") - titleFontSize: Constants.addAccountPopup.labelFontSize1 totalSteps: 4 completedSteps: 1 leftPadding: 0 @@ -41,7 +39,6 @@ Item { Layout.preferredWidth: parent.width Layout.alignment: Qt.AlignCenter horizontalAlignment: Text.AlignHCenter - font.pixelSize: Constants.addAccountPopup.labelFontSize1 color: Theme.palette.directColor1 text: qsTr("Write down your 12-word recovery phrase to keep offline") } @@ -65,7 +62,6 @@ Item { Layout.alignment: Qt.AlignCenter horizontalAlignment: Text.AlignHCenter visible: !root.store.seedPhraseRevealed - font.pixelSize: Constants.addAccountPopup.labelFontSize1 textFormat: Text.RichText wrapMode: Text.WordWrap color: Theme.palette.dangerColor1 diff --git a/ui/imports/shared/popups/addaccount/states/EnterKeypairName.qml b/ui/imports/shared/popups/addaccount/states/EnterKeypairName.qml index a941275db35..ea1998becde 100644 --- a/ui/imports/shared/popups/addaccount/states/EnterKeypairName.qml +++ b/ui/imports/shared/popups/addaccount/states/EnterKeypairName.qml @@ -55,7 +55,7 @@ Item { StatusBaseText { text: qsTr("For your future reference. This is only visible to you.") - font.pixelSize: Constants.addAccountPopup.labelFontSize2 + font.pixelSize: Theme.additionalTextSize color: Theme.palette.baseColor1 } } diff --git a/ui/imports/shared/popups/addaccount/states/EnterSeedPhraseWord.qml b/ui/imports/shared/popups/addaccount/states/EnterSeedPhraseWord.qml index 03bc9f5d463..a22f0971c4d 100644 --- a/ui/imports/shared/popups/addaccount/states/EnterSeedPhraseWord.qml +++ b/ui/imports/shared/popups/addaccount/states/EnterSeedPhraseWord.qml @@ -94,11 +94,9 @@ Item { StatusStepper { Layout.preferredWidth: Constants.addAccountPopup.stepperWidth - Layout.preferredHeight: Constants.addAccountPopup.stepperHeight Layout.topMargin: Theme.padding Layout.alignment: Qt.AlignCenter title: qsTr("Step %1 of 4").arg(d.step) - titleFontSize: Constants.addAccountPopup.labelFontSize1 totalSteps: 4 completedSteps: d.step leftPadding: 0 @@ -109,7 +107,6 @@ Item { Layout.preferredWidth: parent.width Layout.alignment: Qt.AlignCenter horizontalAlignment: Text.AlignHCenter - font.pixelSize: Constants.addAccountPopup.labelFontSize1 color: Theme.palette.directColor1 text: qsTr("Confirm word #%1 of your recovery phrase").arg(root.store.currentState.stateType === Constants.addAccountPopup.state.enterSeedPhraseWord1? root.store.seedPhraseWord1WordNumber + 1 : diff --git a/ui/imports/shared/popups/addaccount/states/Main.qml b/ui/imports/shared/popups/addaccount/states/Main.qml index 68e548abc64..95241b7ed7f 100644 --- a/ui/imports/shared/popups/addaccount/states/Main.qml +++ b/ui/imports/shared/popups/addaccount/states/Main.qml @@ -166,7 +166,6 @@ Item { Layout.fillWidth: true model: Theme.palette.customisationColorsArray title.color: Theme.palette.directColor1 - title.font.pixelSize: Constants.addAccountPopup.labelFontSize1 title.text: qsTr("Colour") selectedColorIndex: -1 diff --git a/ui/imports/shared/popups/addaccount/states/qmldir b/ui/imports/shared/popups/addaccount/states/qmldir new file mode 100644 index 00000000000..44891b656a5 --- /dev/null +++ b/ui/imports/shared/popups/addaccount/states/qmldir @@ -0,0 +1 @@ +ConfirmAddingNewMasterKey 1.0 ConfirmAddingNewMasterKey.qml diff --git a/ui/imports/shared/popups/common/AddressDetails.qml b/ui/imports/shared/popups/common/AddressDetails.qml index 5740c24e40a..a18c8c66cf5 100644 --- a/ui/imports/shared/popups/common/AddressDetails.qml +++ b/ui/imports/shared/popups/common/AddressDetails.qml @@ -28,7 +28,7 @@ Row { StatusBaseText { width: icon.visible? parent.width - icon.width : parent.width - font.pixelSize: Constants.addAccountPopup.labelFontSize2 + font.pixelSize: Theme.additionalTextSize wrapMode: Text.WordWrap text: { if (root.defaultMessageCondition) { diff --git a/ui/imports/shared/popups/common/AddressWithAddressDetails.qml b/ui/imports/shared/popups/common/AddressWithAddressDetails.qml index 89971617fb9..83503662a8a 100644 --- a/ui/imports/shared/popups/common/AddressWithAddressDetails.qml +++ b/ui/imports/shared/popups/common/AddressWithAddressDetails.qml @@ -23,7 +23,6 @@ Column { StatusBaseText { text: root.addressText - font.pixelSize: Constants.addAccountPopup.labelFontSize1 } StatusInput { diff --git a/ui/imports/shared/popups/common/EnterPrivateKey.qml b/ui/imports/shared/popups/common/EnterPrivateKey.qml index 2de15f5d685..3aaf99b1dca 100644 --- a/ui/imports/shared/popups/common/EnterPrivateKey.qml +++ b/ui/imports/shared/popups/common/EnterPrivateKey.qml @@ -38,7 +38,6 @@ Item { StatusBaseText { width: parent.width text: root.store.isAddAccountPopup? qsTr("Private key") : qsTr("Enter recovery phrase for %1 key pair").arg(root.store.selectedKeypair.name) - font.pixelSize: Constants.addAccountPopup.labelFontSize1 elide: Text.ElideRight } @@ -119,7 +118,7 @@ Item { visible: !d.addressResolved multiline: true leftPadding: Theme.padding - font.pixelSize: Constants.addAccountPopup.labelFontSize2 + font.pixelSize: Theme.additionalTextSize text: qsTr("New addresses cannot be derived from an account imported from a private key. Import using a recovery phrase if you wish to derive addresses.") input.edit.enabled: false input.enabled: false @@ -188,7 +187,7 @@ Item { StatusBaseText { text: qsTr("For your future reference. This is only visible to you.") - font.pixelSize: Constants.addAccountPopup.labelFontSize2 + font.pixelSize: Theme.additionalTextSize color: Theme.palette.baseColor1 } } diff --git a/ui/imports/shared/popups/common/EnterSeedPhrase.qml b/ui/imports/shared/popups/common/EnterSeedPhrase.qml index fe97d3e1144..b8966b693e6 100644 --- a/ui/imports/shared/popups/common/EnterSeedPhrase.qml +++ b/ui/imports/shared/popups/common/EnterSeedPhrase.qml @@ -27,7 +27,6 @@ ColumnLayout { Layout.rightMargin: Theme.padding text: root.store.isAddAccountPopup? qsTr("Enter recovery phrase") : qsTr("Enter private key for %1 key pair").arg(root.store.selectedKeypair.name) - font.pixelSize: Constants.addAccountPopup.labelFontSize1 elide: Text.ElideRight } @@ -124,7 +123,7 @@ ColumnLayout { Layout.bottomMargin: Theme.padding text: qsTr("For your future reference. This is only visible to you.") - font.pixelSize: Constants.addAccountPopup.labelFontSize2 + font.pixelSize: Theme.additionalTextSize color: Theme.palette.baseColor1 wrapMode: Text.Wrap } diff --git a/ui/imports/shared/popups/keycard/helpers/KeyPairUnknownItem.qml b/ui/imports/shared/popups/keycard/helpers/KeyPairUnknownItem.qml index e73c6d57d2a..afc65510615 100644 --- a/ui/imports/shared/popups/keycard/helpers/KeyPairUnknownItem.qml +++ b/ui/imports/shared/popups/keycard/helpers/KeyPairUnknownItem.qml @@ -65,7 +65,6 @@ Rectangle { Layout.leftMargin: Theme.padding Layout.alignment: Qt.AlignLeft text: qsTr("Active Accounts") - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.baseColor1 wrapMode: Text.WordWrap } @@ -101,7 +100,6 @@ Rectangle { StatusBaseText { text: LocaleUtils.currencyAmountToLocaleString(model.account.balance) wrapMode: Text.WordWrap - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.baseColor1 } } @@ -119,7 +117,6 @@ Rectangle { StatusBaseText { text: model.account.path wrapMode: Text.WordWrap - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.baseColor1 } } @@ -131,7 +128,6 @@ Rectangle { id: address text: StatusQUtils.Utils.elideText(model.account.address, 6, 4) wrapMode: Text.WordWrap - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.directColor1 } diff --git a/ui/imports/shared/popups/keycard/states/EnterName.qml b/ui/imports/shared/popups/keycard/states/EnterName.qml index d29a8b69cb4..e28d5308115 100644 --- a/ui/imports/shared/popups/keycard/states/EnterName.qml +++ b/ui/imports/shared/popups/keycard/states/EnterName.qml @@ -60,10 +60,9 @@ Item { anchors.rightMargin: Theme.xlPadding spacing: Theme.padding - StatusBaseText { + TitleText { id: title Layout.alignment: Qt.AlignCenter - font.weight: Font.Bold } StatusInput { @@ -97,7 +96,6 @@ Item { StatusBaseText { Layout.alignment: Qt.AlignLeft text: qsTr("Preview") - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.baseColor1 } @@ -127,8 +125,6 @@ Item { return qsTr("Name this Keycard") } - font.pixelSize: Constants.keycard.general.fontSize1 - color: Theme.palette.directColor1 } PropertyChanges { target: keycardName diff --git a/ui/imports/shared/popups/keycard/states/EnterPairingCode.qml b/ui/imports/shared/popups/keycard/states/EnterPairingCode.qml index 4865bb66acb..eb6484ba552 100644 --- a/ui/imports/shared/popups/keycard/states/EnterPairingCode.qml +++ b/ui/imports/shared/popups/keycard/states/EnterPairingCode.qml @@ -61,21 +61,17 @@ Item { spacing: Theme.padding clip: true - StatusBaseText { + TitleText { id: title Layout.preferredHeight: Constants.keycard.general.titleHeight Layout.alignment: Qt.AlignHCenter text: qsTr("Enter a new pairing code") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold - color: Theme.palette.directColor1 } StatusBaseText { Layout.preferredWidth: code0.width Layout.alignment: Qt.AlignCenter text: qsTr("Pairing code") - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.directColor1 } @@ -128,7 +124,6 @@ Item { Layout.preferredWidth: code1.width Layout.alignment: Qt.AlignCenter text: qsTr("Confirm pairing code") - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.directColor1 } @@ -176,7 +171,7 @@ Item { id: errorTxt Layout.alignment: Qt.AlignHCenter Layout.fillHeight: true - font.pixelSize: Constants.keycard.general.fontSize3 + font.pixelSize: Theme.tertiaryTextFontSize color: Theme.palette.dangerColor1 } } diff --git a/ui/imports/shared/popups/keycard/states/EnterPassword.qml b/ui/imports/shared/popups/keycard/states/EnterPassword.qml index dcaf5696140..43ee493b00f 100644 --- a/ui/imports/shared/popups/keycard/states/EnterPassword.qml +++ b/ui/imports/shared/popups/keycard/states/EnterPassword.qml @@ -65,11 +65,10 @@ Item { Layout.preferredWidth: Constants.keycard.shared.imageWidth } - StatusBaseText { + TitleText { id: title Layout.alignment: Qt.AlignCenter Layout.maximumWidth: parent.width - font.weight: Font.Bold } StatusBaseText { @@ -127,8 +126,6 @@ Item { PropertyChanges { target: title text: qsTr("Enter your password") - font.pixelSize: Constants.keycard.general.fontSize1 - color: Theme.palette.directColor1 } PropertyChanges { target: message @@ -150,8 +147,6 @@ Item { PropertyChanges { target: title text: qsTr("Enter your password") - font.pixelSize: Constants.keycard.general.fontSize1 - color: Theme.palette.directColor1 } PropertyChanges { target: message @@ -174,8 +169,6 @@ Item { PropertyChanges { target: title text: qsTr("Stored password doesn't match") - font.pixelSize: Constants.keycard.general.fontSize1 - color: Theme.palette.directColor1 } PropertyChanges { target: message @@ -199,8 +192,6 @@ Item { PropertyChanges { target: title text: qsTr("Stored password doesn't match") - font.pixelSize: Constants.keycard.general.fontSize1 - color: Theme.palette.directColor1 } PropertyChanges { target: message diff --git a/ui/imports/shared/popups/keycard/states/EnterSeedPhrase.qml b/ui/imports/shared/popups/keycard/states/EnterSeedPhrase.qml index be0b2eb35a8..1f7e8f17658 100644 --- a/ui/imports/shared/popups/keycard/states/EnterSeedPhrase.qml +++ b/ui/imports/shared/popups/keycard/states/EnterSeedPhrase.qml @@ -41,14 +41,12 @@ Item { spacing: Theme.xlPadding width: scrollView.availableWidth - StatusBaseText { + TitleText { id: title Layout.fillWidth: true visible: text !== "" - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold horizontalAlignment: Text.AlignHCenter wrapMode: Text.WordWrap } diff --git a/ui/imports/shared/popups/keycard/states/EnterSeedPhraseWords.qml b/ui/imports/shared/popups/keycard/states/EnterSeedPhraseWords.qml index 7fac558e59a..9f36d6cad85 100644 --- a/ui/imports/shared/popups/keycard/states/EnterSeedPhraseWords.qml +++ b/ui/imports/shared/popups/keycard/states/EnterSeedPhraseWords.qml @@ -58,14 +58,11 @@ Item { spacing: Theme.padding clip: true - StatusBaseText { + TitleText { id: title Layout.preferredHeight: Constants.keycard.general.titleHeight Layout.alignment: Qt.AlignHCenter text: qsTr("Confirm recovery phrase words") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold - color: Theme.palette.directColor1 } StatusInput { diff --git a/ui/imports/shared/popups/keycard/states/KeycardConfirmation.qml b/ui/imports/shared/popups/keycard/states/KeycardConfirmation.qml index a23cedfe357..1d1fc6559ba 100644 --- a/ui/imports/shared/popups/keycard/states/KeycardConfirmation.qml +++ b/ui/imports/shared/popups/keycard/states/KeycardConfirmation.qml @@ -81,7 +81,6 @@ Item { return qsTr("A factory reset will delete the key on this Keycard.\nAre you sure you want to do this?") } - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.dangerColor1 } @@ -92,7 +91,6 @@ Item { Layout.fillWidth: true leftSide: false spacing: Theme.smallPadding - font.pixelSize: Constants.keycard.general.fontSize2 text: qsTr("I understand the key pair on this Keycard will be deleted") onCheckedChanged: { diff --git a/ui/imports/shared/popups/keycard/states/KeycardInit.qml b/ui/imports/shared/popups/keycard/states/KeycardInit.qml index 1d6533006bd..8c8a7ba719f 100644 --- a/ui/imports/shared/popups/keycard/states/KeycardInit.qml +++ b/ui/imports/shared/popups/keycard/states/KeycardInit.qml @@ -159,8 +159,9 @@ Item { root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.changingKeycardPairingCode || root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.copyingKeycard } - StatusBaseText { + TitleText { id: title + wrapMode: Text.WordWrap } } @@ -560,8 +561,6 @@ Item { PropertyChanges { target: title text: qsTr("Plug in Keycard reader...") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 } PropertyChanges { @@ -585,8 +584,6 @@ Item { } return qsTr("Insert Keycard...") } - font.weight: Font.Bold - font.pixelSize: Constants.keycard.general.fontSize1 color: Theme.palette.directColor1 } PropertyChanges { @@ -604,7 +601,6 @@ Item { text: root.sharedKeycardModule.keycardData & Constants.predefinedKeycardData.wronglyInsertedCard? qsTr("Check the card, it might be wrongly inserted") : "" - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.baseColor1 } }, @@ -614,8 +610,6 @@ Item { PropertyChanges { target: title text: qsTr("Keycard inserted...") - font.weight: Font.Bold - font.pixelSize: Constants.keycard.general.fontSize1 color: Theme.palette.directColor1 } PropertyChanges { @@ -692,8 +686,7 @@ Item { } return "" } - font.pixelSize: Constants.keycard.general.fontSize2 - font.weight: Font.Bold + font.pixelSize: Theme.primaryTextFontSize color: Theme.palette.baseColor1 } PropertyChanges { @@ -729,8 +722,6 @@ Item { PropertyChanges { target: title text: qsTr("PCSC not available") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.dangerColor1 } PropertyChanges { @@ -746,7 +737,6 @@ Item { PropertyChanges { target: message text: qsTr("The Smartcard reader (PCSC service), required\nfor using Keycard, is not currently working.\nEnsure PCSC is installed and running and try again") - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.dangerColor1 } }, @@ -756,8 +746,6 @@ Item { PropertyChanges { target: title text: qsTr("This is not a Keycard") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.dangerColor1 } PropertyChanges { @@ -780,7 +768,6 @@ Item { PropertyChanges { target: message text: qsTr("The card inserted is not a recognised Keycard,\nplease remove and try and again") - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.dangerColor1 } }, @@ -790,8 +777,6 @@ Item { PropertyChanges { target: title text: qsTr("Unlock this Keycard") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 } PropertyChanges { @@ -813,7 +798,6 @@ Item { } return "" } - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.directColor1 } }, @@ -823,8 +807,6 @@ Item { PropertyChanges { target: title text: qsTr("Wrong Keycard inserted") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.dangerColor1 } PropertyChanges { @@ -852,7 +834,6 @@ Item { } return "" } - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.dangerColor1 } }, @@ -862,8 +843,6 @@ Item { PropertyChanges { target: title text: qsTr("This Keycard has empty metadata") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 } PropertyChanges { @@ -880,7 +859,6 @@ Item { return qsTr("This Keycard already stores keys\nbut doesn't store any metadata") } - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.directColor1 } }, @@ -890,8 +868,6 @@ Item { PropertyChanges { target: title text: qsTr("Keycard is empty") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 } PropertyChanges { @@ -908,7 +884,6 @@ Item { return qsTr("There is no key pair on this Keycard") } - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.directColor1 } }, @@ -918,8 +893,6 @@ Item { PropertyChanges { target: title text: qsTr("This Keycard already stores keys") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 } PropertyChanges { @@ -945,7 +918,6 @@ Item { return "" } - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.directColor1 } }, @@ -961,8 +933,6 @@ Item { root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.setupNewKeycardOldSeedPhrase || root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.createCopyOfAKeycard? qsTr("Keycard locked and already stores keys") : qsTr("Keycard locked") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.setupNewKeycard || root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.setupNewKeycardNewSeedPhrase || root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.setupNewKeycardOldSeedPhrase || @@ -998,7 +968,6 @@ Item { return qsTr("Max pairing slots reached for the entered keycard") return "" } - font.pixelSize: Constants.keycard.general.fontSize2 color: root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.setupNewKeycard || root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.setupNewKeycardNewSeedPhrase || root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.setupNewKeycardOldSeedPhrase || @@ -1012,8 +981,6 @@ Item { PropertyChanges { target: title text: qsTr("Your Keycard is already unlocked!") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 } PropertyChanges { @@ -1037,7 +1004,7 @@ Item { PropertyChanges { target: title text: qsTr("Keycard recognized") - font.pixelSize: Constants.keycard.general.fontSize2 + font.pixelSize: Theme.primaryTextFontSize font.weight: Font.Normal color: Theme.palette.baseColor1 } @@ -1109,8 +1076,6 @@ Item { } return "" } - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 } PropertyChanges { @@ -1145,7 +1110,6 @@ Item { } return "" } - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.directColor1 } }, @@ -1193,8 +1157,6 @@ Item { } return "" } - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 } PropertyChanges { @@ -1218,8 +1180,6 @@ Item { PropertyChanges { target: title text: qsTr("Accounts on this Keycard") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 } PropertyChanges { @@ -1233,7 +1193,6 @@ Item { root.sharedKeycardModule.keyPairHelper.accounts.count > root.sharedKeycardModule.remainingAccountCapacity()? qsTr("Adding these accounts will exceed the limit of 20.\nRemove some already added accounts to be able to import a new ones.") : "" - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.dangerColor1 } }, @@ -1243,8 +1202,6 @@ Item { PropertyChanges { target: title text: qsTr("Ready to authenticate...") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 } PropertyChanges { @@ -1268,8 +1225,6 @@ Item { PropertyChanges { target: title text: qsTr("Biometric scan failed") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 } PropertyChanges { @@ -1289,8 +1244,6 @@ Item { PropertyChanges { target: title text: qsTr("Biometric scan failed") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 } PropertyChanges { @@ -1310,14 +1263,11 @@ Item { PropertyChanges { target: title text: qsTr("Biometric pin invalid") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.dangerColor1 } PropertyChanges { target: message text: qsTr("The PIN length doesn't match Keycard's PIN length") - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.baseColor1 } }, @@ -1327,8 +1277,6 @@ Item { PropertyChanges { target: title text: qsTr("Remove Keycard") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 } PropertyChanges { @@ -1352,8 +1300,6 @@ Item { PropertyChanges { target: title text: qsTr("Oops this is the same Keycard!") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 } PropertyChanges { @@ -1369,7 +1315,6 @@ Item { PropertyChanges { target: message text: qsTr("You need to remove this Keycard and insert\nan empty new or factory reset Keycard") - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.directColor1 } }, @@ -1380,8 +1325,6 @@ Item { target: title text: qsTr("Copy “%1” to inserted keycard") .arg(root.sharedKeycardModule.keyPairForProcessing.name) - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 } PropertyChanges { @@ -1408,8 +1351,6 @@ Item { } return "" } - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 } PropertyChanges { @@ -1443,8 +1384,6 @@ Item { } return "" } - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 horizontalAlignment: Text.AlignHCenter } @@ -1474,7 +1413,6 @@ Item { } return "" } - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.directColor1 Layout.leftMargin: 2 * Theme.xlPadding Layout.rightMargin: 2* Theme.xlPadding @@ -1496,8 +1434,6 @@ Item { } return "" } - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 horizontalAlignment: Text.AlignHCenter } @@ -1518,7 +1454,6 @@ Item { } return "" } - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.directColor1 Layout.leftMargin: 2 * Theme.xlPadding Layout.rightMargin: 2* Theme.xlPadding @@ -1531,8 +1466,6 @@ Item { PropertyChanges { target: title text: qsTr("Biometrics") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold color: Theme.palette.directColor1 horizontalAlignment: Text.AlignHCenter } @@ -1544,7 +1477,6 @@ Item { PropertyChanges { target: message text: qsTr("Would you like to use Touch ID\nto login to Status?") - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.baseColor1 horizontalAlignment: Text.AlignHCenter Layout.preferredWidth: layout.width - 4 * Theme.xlPadding diff --git a/ui/imports/shared/popups/keycard/states/KeycardPin.qml b/ui/imports/shared/popups/keycard/states/KeycardPin.qml index 71f92d1e9fd..bc1e1b6a5d6 100644 --- a/ui/imports/shared/popups/keycard/states/KeycardPin.qml +++ b/ui/imports/shared/popups/keycard/states/KeycardPin.qml @@ -96,10 +96,9 @@ Item { Layout.preferredWidth: Constants.keycard.shared.imageWidth } - StatusBaseText { + TitleText { id: title Layout.alignment: Qt.AlignCenter - font.weight: Font.Bold } StatusBaseText { @@ -107,6 +106,9 @@ Item { Layout.alignment: Qt.AlignCenter wrapMode: Text.WordWrap visible: text !== "" + + font.pixelSize: Theme.tertiaryTextFontSize + color: Theme.palette.baseColor1 } StatusPinInput { @@ -156,6 +158,9 @@ Item { horizontalAlignment: Text.AlignHCenter wrapMode: Text.WordWrap visible: text !== "" + + font.pixelSize: Theme.tertiaryTextFontSize + color: Theme.palette.dangerColor1 } StatusBaseText { @@ -164,6 +169,8 @@ Item { horizontalAlignment: Text.AlignHCenter wrapMode: Text.WordWrap visible: text !== "" + + font.pixelSize: Theme.tertiaryTextFontSize } Loader { @@ -235,8 +242,6 @@ Item { } return qsTr("Enter this Keycard’s PIN") } - font.pixelSize: Constants.keycard.general.fontSize1 - color: Theme.palette.directColor1 } PropertyChanges { target: subTitle @@ -262,8 +267,6 @@ Item { PropertyChanges { target: title text: qsTr("Enter Keycard PIN") - font.pixelSize: Constants.keycard.general.fontSize1 - color: Theme.palette.directColor1 } PropertyChanges { target: subTitle @@ -272,8 +275,6 @@ Item { PropertyChanges { target: info text: qsTr("PIN incorrect") - color: Theme.palette.dangerColor1 - font.pixelSize: Constants.keycard.general.fontSize3 } PropertyChanges { target: message @@ -281,7 +282,6 @@ Item { color: root.remainingAttempts === 1? Theme.palette.dangerColor1 : Theme.palette.baseColor1 - font.pixelSize: Constants.keycard.general.fontSize3 } }, State { @@ -295,20 +295,14 @@ Item { PropertyChanges { target: title text: qsTr("Your saved PIN is out of date") - font.pixelSize: Constants.keycard.general.fontSize1 - color: Theme.palette.directColor1 } PropertyChanges { target: subTitle text: qsTr("Enter your new PIN to proceed") - font.pixelSize: Constants.keycard.general.fontSize3 - color: Theme.palette.baseColor1 } PropertyChanges { target: info text: qsTr("PIN incorrect") - color: Theme.palette.dangerColor1 - font.pixelSize: Constants.keycard.general.fontSize3 } PropertyChanges { target: message @@ -316,7 +310,6 @@ Item { color: root.remainingAttempts === 1? Theme.palette.dangerColor1 : Theme.palette.baseColor1 - font.pixelSize: Constants.keycard.general.fontSize3 } }, State { @@ -335,8 +328,6 @@ Item { } return qsTr("Choose a Keycard PIN") } - font.pixelSize: Constants.keycard.general.fontSize1 - color: Theme.palette.directColor1 } PropertyChanges { target: subTitle @@ -350,8 +341,6 @@ Item { } return d.message1 } - color: Theme.palette.dangerColor1 - font.pixelSize: Constants.keycard.general.fontSize3 } PropertyChanges { target: message @@ -374,8 +363,6 @@ Item { } return qsTr("Repeat Keycard PIN") } - font.pixelSize: Constants.keycard.general.fontSize1 - color: Theme.palette.directColor1 } PropertyChanges { target: subTitle @@ -389,8 +376,6 @@ Item { } return d.message1 } - color: Theme.palette.dangerColor1 - font.pixelSize: Constants.keycard.general.fontSize3 } PropertyChanges { target: message @@ -426,8 +411,6 @@ Item { } return "" } - font.pixelSize: Constants.keycard.general.fontSize1 - color: Theme.palette.directColor1 } PropertyChanges { target: subTitle @@ -463,8 +446,6 @@ Item { } return "" } - font.pixelSize: Constants.keycard.general.fontSize1 - color: Theme.palette.directColor1 } PropertyChanges { target: subTitle diff --git a/ui/imports/shared/popups/keycard/states/KeycardPuk.qml b/ui/imports/shared/popups/keycard/states/KeycardPuk.qml index 18c746101a8..3e71bc6bf47 100644 --- a/ui/imports/shared/popups/keycard/states/KeycardPuk.qml +++ b/ui/imports/shared/popups/keycard/states/KeycardPuk.qml @@ -48,10 +48,9 @@ Item { Layout.preferredWidth: Constants.keycard.shared.imageWidth } - StatusBaseText { + TitleText { id: title Layout.alignment: Qt.AlignCenter - font.weight: Font.Bold } StatusPinInput { @@ -95,6 +94,9 @@ Item { Layout.alignment: Qt.AlignCenter wrapMode: Text.WordWrap visible: text !== "" + + color: Theme.palette.dangerColor1 + font.pixelSize: Theme.tertiaryTextFontSize } StatusBaseText { @@ -102,6 +104,8 @@ Item { Layout.alignment: Qt.AlignCenter wrapMode: Text.WordWrap visible: text !== "" + + font.pixelSize: Theme.tertiaryTextFontSize } Item { @@ -123,8 +127,6 @@ Item { PropertyChanges { target: title text: qsTr("Enter PUK") - font.pixelSize: Constants.keycard.general.fontSize1 - color: Theme.palette.directColor1 } PropertyChanges { target: info @@ -146,14 +148,10 @@ Item { PropertyChanges { target: title text: qsTr("Enter PUK") - font.pixelSize: Constants.keycard.general.fontSize1 - color: Theme.palette.directColor1 } PropertyChanges { target: info text: qsTr("The PUK is incorrect, try entering it again") - color: Theme.palette.dangerColor1 - font.pixelSize: Constants.keycard.general.fontSize3 } PropertyChanges { target: message @@ -161,7 +159,6 @@ Item { color: root.remainingAttempts === 1? Theme.palette.dangerColor1 : Theme.palette.baseColor1 - font.pixelSize: Constants.keycard.general.fontSize3 } }, State { @@ -175,8 +172,6 @@ Item { PropertyChanges { target: title text: qsTr("Choose a Keycard PUK") - font.pixelSize: Constants.keycard.general.fontSize1 - color: Theme.palette.directColor1 } PropertyChanges { target: info @@ -198,14 +193,10 @@ Item { PropertyChanges { target: title text: qsTr("Repeat your Keycard PUK") - font.pixelSize: Constants.keycard.general.fontSize1 - color: Theme.palette.directColor1 } PropertyChanges { target: info text: "" - color: Theme.palette.dangerColor1 - font.pixelSize: Constants.keycard.general.fontSize3 } PropertyChanges { target: message diff --git a/ui/imports/shared/popups/keycard/states/ManageAccounts.qml b/ui/imports/shared/popups/keycard/states/ManageAccounts.qml index ce4941dc780..4092889523b 100644 --- a/ui/imports/shared/popups/keycard/states/ManageAccounts.qml +++ b/ui/imports/shared/popups/keycard/states/ManageAccounts.qml @@ -113,13 +113,11 @@ Item { id: stepper Layout.preferredWidth: Constants.keycard.general.keycardNameInputWidth Layout.alignment: Qt.AlignCenter - titleFontSize: Constants.keycard.general.fontSize2 } - StatusBaseText { + TitleText { id: title Layout.alignment: Qt.AlignCenter - font.weight: Font.Bold } Rectangle { @@ -144,7 +142,6 @@ Item { StatusBaseText { text: d.observedImportingAccountShortAddress wrapMode: Text.WordWrap - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.baseColor1 } @@ -152,7 +149,6 @@ Item { text: root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.importFromKeycard? root.sharedKeycardModule.keyPairHelper.observedAccount.path : "" wrapMode: Text.WordWrap - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.baseColor1 } } @@ -166,7 +162,6 @@ Item { StatusBaseText { text: qsTr("Balance: %1").arg(LocaleUtils.currencyAmountToLocaleString(root.sharedKeycardModule.keyPairHelper.observedAccount.balance)) wrapMode: Text.WordWrap - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.baseColor1 } @@ -176,7 +171,6 @@ Item { StatusBaseText { text: qsTr("View on Etherscan") wrapMode: Text.WordWrap - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.baseColor1 } @@ -243,7 +237,6 @@ Item { id: colorSelection Layout.alignment: Qt.AlignCenter title.text: qsTr("Colour") - title.font.pixelSize: Constants.keycard.general.fontSize2 model: Theme.palette.customisationColorsArray onSelectedColorChanged: { @@ -254,7 +247,6 @@ Item { StatusBaseText { Layout.alignment: Qt.AlignLeft text: qsTr("Preview") - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.baseColor1 } @@ -316,8 +308,6 @@ Item { return qsTr("Name accounts") } - font.pixelSize: Constants.keycard.general.fontSize1 - color: Theme.palette.directColor1 } PropertyChanges { target: accountDetails diff --git a/ui/imports/shared/popups/keycard/states/SeedPhrase.qml b/ui/imports/shared/popups/keycard/states/SeedPhrase.qml index 4f719edaa1d..3cec4eab0a6 100644 --- a/ui/imports/shared/popups/keycard/states/SeedPhrase.qml +++ b/ui/imports/shared/popups/keycard/states/SeedPhrase.qml @@ -24,10 +24,11 @@ Item { anchors.rightMargin: Theme.xlPadding spacing: Theme.padding - StatusBaseText { + TitleText { id: title Layout.preferredHeight: Constants.keycard.general.titleHeight Layout.alignment: Qt.AlignCenter + wrapMode: Text.WordWrap } @@ -56,14 +57,10 @@ Item { PropertyChanges { target: title text: qsTr("Write down your recovery 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 recovery phrase.
Anyone 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 diff --git a/ui/imports/shared/popups/keycard/states/SelectKeyPair.qml b/ui/imports/shared/popups/keycard/states/SelectKeyPair.qml index 85aef4702dc..313f2ed1216 100644 --- a/ui/imports/shared/popups/keycard/states/SelectKeyPair.qml +++ b/ui/imports/shared/popups/keycard/states/SelectKeyPair.qml @@ -40,13 +40,10 @@ Item { id: keyPairsButtonGroup } - StatusBaseText { + TitleText { id: title Layout.alignment: Qt.AlignHCenter text: qsTr("Select a key pair") - font.pixelSize: Constants.keycard.general.fontSize1 - font.weight: Font.Bold - color: Theme.palette.directColor1 wrapMode: Text.WordWrap } @@ -54,7 +51,6 @@ Item { id: subTitle Layout.alignment: Qt.AlignHCenter text: qsTr("Select which key pair you’d like to move to this Keycard") - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.baseColor1 wrapMode: Text.WordWrap } @@ -71,7 +67,6 @@ Item { Layout.leftMargin: Theme.padding Layout.alignment: Qt.AlignLeft text: qsTr("Profile key pair") - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.baseColor1 wrapMode: Text.WordWrap } @@ -103,7 +98,6 @@ Item { Layout.leftMargin: Theme.padding Layout.alignment: Qt.AlignLeft text: qsTr("Other key pairs") - font.pixelSize: Constants.keycard.general.fontSize2 color: Theme.palette.baseColor1 wrapMode: Text.WordWrap } diff --git a/ui/imports/shared/popups/keycard/states/TitleText.qml b/ui/imports/shared/popups/keycard/states/TitleText.qml new file mode 100644 index 00000000000..04d921fd019 --- /dev/null +++ b/ui/imports/shared/popups/keycard/states/TitleText.qml @@ -0,0 +1,9 @@ +import QtQuick + +import StatusQ.Core +import StatusQ.Core.Theme + +StatusBaseText { + font.weight: Font.Bold + font.pixelSize: Theme.fontSize(22) +} diff --git a/ui/imports/shared/popups/keypairimport/states/SelectImportMethod.qml b/ui/imports/shared/popups/keypairimport/states/SelectImportMethod.qml index d36c10ae264..b89e4d9abec 100644 --- a/ui/imports/shared/popups/keypairimport/states/SelectImportMethod.qml +++ b/ui/imports/shared/popups/keypairimport/states/SelectImportMethod.qml @@ -28,7 +28,7 @@ Item { StatusBaseText { Layout.fillWidth: true text: qsTr("Import method") - font.pixelSize: Constants.keypairImportPopup.labelFontSize1 + font.pixelSize: Theme.primaryTextFontSize color: Theme.palette.baseColor1 } diff --git a/ui/imports/shared/status/StatusChatInput.qml b/ui/imports/shared/status/StatusChatInput.qml index 5588c08dbda..4d57b6359b1 100644 --- a/ui/imports/shared/status/StatusChatInput.qml +++ b/ui/imports/shared/status/StatusChatInput.qml @@ -113,7 +113,7 @@ Rectangle { const linkTag = message.substring(index, endIndex) const linkText = linkTag.replace(/(<([^>]+)>)/ig,"").trim() const atSymbol = linkText.startsWith("@") ? '' : '@' - const mentionTag = Constants.mentionSpanTag + atSymbol + linkText + ' ' + const mentionTag = d.mentionSpanTag + atSymbol + linkText + ' ' mentionsMap.set(mentionLink, mentionTag) index += linkTag.length } @@ -176,6 +176,8 @@ Rectangle { readonly property point emojiPopupPosition: getCommonPopupRelativePosition(emojiPopup, emojiBtn) readonly property point stickersPopupPosition: getCommonPopupRelativePosition(stickersPopup, stickersBtn) + readonly property string mentionSpanTag: `` + readonly property StateGroup emojiPopupTakeover: StateGroup { states: State { when: d.emojiPopupOpened @@ -274,7 +276,7 @@ Rectangle { } const hasEmoji = StatusQUtils.Emoji.hasEmoji(messageInputField.text) - const spanPlusAlias = `${Constants.mentionSpanTag}@${aliasName} `; + const spanPlusAlias = `${d.mentionSpanTag}@${aliasName} `; let rightIndex = hasEmoji ? lastCursorPosition + 2 : lastCursorPosition messageInputField.remove(lastAtPosition, rightIndex) diff --git a/ui/imports/utils/Constants.qml b/ui/imports/utils/Constants.qml index 0ac0cd65018..66e54163673 100644 --- a/ui/imports/utils/Constants.qml +++ b/ui/imports/utils/Constants.qml @@ -2,8 +2,8 @@ pragma Singleton import QtQml -import StatusQ.Core.Theme import StatusQ.Controls.Validators +import StatusQ.Core.Theme QtObject { id: root @@ -32,87 +32,6 @@ QtObject { readonly property var newChains: [binanceSmartChainMainnetChainId, binanceSmartChainTestnetChainId] } - readonly property QtObject startupFlow: QtObject { - readonly property string general: "General" - readonly property string firstRunNewUserNewKeys: "FirstRunNewUserNewKeys" - readonly property string firstRunNewUserNewKeycardKeys: "FirstRunNewUserNewKeycardKeys" - readonly property string firstRunNewUserImportSeedPhrase: "FirstRunNewUserImportSeedPhrase" - readonly property string firstRunNewUserImportSeedPhraseIntoKeycard: "FirstRunNewUserImportSeedPhraseIntoKeycard" - readonly property string firstRunOldUserSyncCode: "FirstRunOldUserSyncCode" - readonly property string firstRunOldUserKeycardImport: "FirstRunOldUserKeycardImport" - readonly property string firstRunOldUserImportSeedPhrase: "FirstRunOldUserImportSeedPhrase" - readonly property string appLogin: "AppLogin" - readonly property string lostKeycardReplacement: "LostKeycardReplacement" - readonly property string lostKeycardConvertToRegularAccount: "LostKeycardConvertToRegularAccount" - } - - readonly property QtObject startupState: QtObject { - readonly property string noState: "NoState" - readonly property string allowNotifications: "AllowNotifications" - readonly property string welcome: "Welcome" - readonly property string welcomeNewStatusUser: "WelcomeNewStatusUser" - readonly property string welcomeOldStatusUser: "WelcomeOldStatusUser" - readonly property string recoverOldUser: "RecoverOldUser" - readonly property string userProfileCreate: "UserProfileCreate" - readonly property string userProfileChatKey: "UserProfileChatKey" - readonly property string userProfileCreateSameChatKey: "UserProfileCreateSameChatKey" - readonly property string userProfileCreatePassword: "UserProfileCreatePassword" - readonly property string userProfileConfirmPassword: "UserProfileConfirmPassword" - readonly property string userProfileImportSeedPhrase: "UserProfileImportSeedPhrase" - readonly property string userProfileEnterSeedPhrase: "UserProfileEnterSeedPhrase" - readonly property string userProfileWrongSeedPhrase: "UserProfileWrongSeedPhrase" - readonly property string biometrics: "Biometrics" - readonly property string keycardNoPCSCService: "KeycardNoPCSCService" - readonly property string keycardPluginReader: "KeycardPluginReader" - readonly property string keycardInsertKeycard: "KeycardInsertKeycard" - readonly property string keycardInsertedKeycard: "KeycardInsertedKeycard" - readonly property string keycardReadingKeycard: "KeycardReadingKeycard" - readonly property string keycardRecognizedKeycard: "KeycardRecognizedKeycard" - readonly property string keycardWrongKeycard: "KeycardWrongKeycard" - readonly property string keycardCreatePin: "KeycardCreatePin" - readonly property string keycardRepeatPin: "KeycardRepeatPin" - readonly property string keycardPinSet: "KeycardPinSet" - readonly property string keycardEnterPin: "KeycardEnterPin" - readonly property string keycardWrongPin: "KeycardWrongPin" - readonly property string keycardEnterPuk: "KeycardEnterPuk" - readonly property string keycardWrongPuk: "KeycardWrongPuk" - readonly property string keycardDisplaySeedPhrase: "KeycardDisplaySeedPhrase" - readonly property string keycardEnterSeedPhraseWords: "KeycardEnterSeedPhraseWords" - readonly property string keycardNotEmpty: "KeycardNotEmpty" - readonly property string keycardNotKeycard: "KeycardNotKeycard" - readonly property string keycardEmpty: "KeycardEmpty" - readonly property string keycardLocked: "KeycardLocked" - readonly property string keycardRecover: "KeycardRecover" - readonly property string keycardMaxPairingSlotsReached: "KeycardMaxPairingSlotsReached" - readonly property string keycardMaxPinRetriesReached: "KeycardMaxPinRetriesReached" - readonly property string keycardMaxPukRetriesReached: "KeycardMaxPukRetriesReached" - readonly property string login: "Login" - readonly property string loginNoPCSCService: "LoginNoPCSCService" - readonly property string loginPlugin: "LoginPlugin" - readonly property string loginKeycardInsertKeycard: "LoginKeycardInsertKeycard" - readonly property string loginKeycardInsertedKeycard: "LoginKeycardInsertedKeycard" - readonly property string loginKeycardReadingKeycard: "LoginKeycardReadingKeycard" - readonly property string loginKeycardRecognizedKeycard: "LoginKeycardRecognizedKeycard" - readonly property string loginKeycardEnterPin: "LoginKeycardEnterPin" - readonly property string loginKeycardEnterPassword: "LoginKeycardEnterPassword" - readonly property string loginKeycardPinVerified: "LoginKeycardPinVerified" - readonly property string loginKeycardWrongKeycard: "LoginKeycardWrongKeycard" - readonly property string loginKeycardWrongPin: "LoginKeycardWrongPin" - readonly property string loginKeycardMaxPinRetriesReached: "LoginKeycardMaxPinRetriesReached" - readonly property string loginKeycardMaxPukRetriesReached: "LoginKeycardMaxPukRetriesReached" - readonly property string loginKeycardMaxPairingSlotsReached: "LoginKeycardMaxPairingSlotsReached" - readonly property string loginKeycardEmpty: "LoginKeycardEmpty" - readonly property string loginNotKeycard: "LoginNotKeycard" - readonly property string loginKeycardConvertedToRegularAccount: "LoginKeycardConvertedToRegularAccount" - readonly property string profileFetching: "ProfileFetching" - readonly property string profileFetchingSuccess: "ProfileFetchingSuccess" - readonly property string profileFetchingTimeout: "ProfileFetchingTimeout" - readonly property string profileFetchingAnnouncement: "ProfileFetchingAnnouncement" - readonly property string lostKeycardOptions: "LostKeycardOptions" - readonly property string syncDeviceWithSyncCode: "SyncDeviceWithSyncCode" - readonly property string syncDeviceResult: "SyncDeviceResult" - } - readonly property QtObject predefinedKeycardData: QtObject { readonly property int wronglyInsertedCard: 1 readonly property int hideKeyPair: 2 @@ -542,17 +461,7 @@ QtObject { readonly property QtObject settingsSection: QtObject { readonly property int itemSpacing: 10 readonly property int radius: 8 - readonly property int mainHeaderFontSize: root.Theme.fontSize(28) // Keep as is - special case for main header - readonly property int subHeaderFontSize: root.Theme.primaryTextFontSize - readonly property int importantInfoFontSize: root.Theme.fontSize(18) - readonly property int infoFontSize: root.Theme.primaryTextFontSize - readonly property int infoLineHeight: 22 - readonly property int infoSpacing: 5 readonly property int itemHeight: 64 - readonly property int leftMargin: root.Theme.xlPadding * 2 - readonly property int rightMargin: root.Theme.xlPadding * 2 - readonly property int topMargin: root.Theme.xlPadding * 2 - readonly property int bottomMargin: root.Theme.xlPadding * 2 readonly property QtObject notificationsBubble: QtObject { readonly property int previewAnonymous: 0 @@ -605,14 +514,9 @@ QtObject { readonly property int keycardPairingCodeInputWidth: 512 readonly property int keycardPukAdditionalSpacingOnEvery4Items: 4 readonly property int keycardPukAdditionalSpacing: 32 - readonly property int fontSize1: root.Theme.fontSize(22) - readonly property int fontSize2: root.Theme.primaryTextFontSize - readonly property int fontSize3: root.Theme.tertiaryTextFontSize readonly property int seedPhraseCellWidth: 193 readonly property int seedPhraseCellHeight: 60 readonly property int seedPhraseCellNumberWidth: 24 - readonly property int seedPhraseCellFontSize: root.Theme.tertiaryTextFontSize - readonly property int buttonFontSize: root.Theme.primaryTextFontSize readonly property int pukCellWidth: 50 readonly property int pukCellHeight: 60 readonly property int popupWidth: 640 @@ -669,8 +573,8 @@ QtObject { readonly property string alphanumericalWithSpaceRegExp: qsTr("Special characters are not allowed") readonly property string asciiRegExp: qsTr("Only letters, numbers and ASCII characters allowed") readonly property string emojRegExp: qsTr("Name is too cool (use A-Z and 0-9, single whitespace, hyphens and underscores only)") - readonly property var wholeNumbers: qsTr("Whole numbers only") - readonly property var positiveRealNumbers: qsTr("Positive real numbers only") + readonly property string wholeNumbers: qsTr("Whole numbers only") + readonly property string positiveRealNumbers: qsTr("Positive real numbers only") } readonly property QtObject socialLinkType: QtObject { @@ -685,30 +589,15 @@ QtObject { readonly property int maxSocialLinkTextLength: 24 - readonly property QtObject localPairingEventType: QtObject { - readonly property int eventUnknown: -1 - readonly property int eventConnectionError: 0 - readonly property int eventConnectionSuccess: 1 - readonly property int eventTransferError: 2 - readonly property int eventTransferSuccess: 3 - readonly property int eventReceivedAccount: 4 - readonly property int eventProcessSuccess: 5 - readonly property int eventProcessError: 6 - } - readonly property QtObject addAccountPopup: QtObject { readonly property int popupWidth: 480 readonly property int contentHeight1: 554 - readonly property int contentHeight2: 642 readonly property int itemHeight: 64 readonly property int importPrivateKeyWarningHeight: 86 - readonly property int labelFontSize1: root.Theme.primaryTextFontSize - readonly property int labelFontSize2: root.Theme.additionalTextSize readonly property int footerButtonsHeight: 44 readonly property int keyPairNameMaxLength: 20 readonly property int keyPairAccountNameMinLength: 5 readonly property int stepperWidth: 242 - readonly property int stepperHeight: 30 readonly property QtObject keyPairType: QtObject { readonly property int unknown: -1 @@ -743,7 +632,6 @@ QtObject { readonly property int popupWidth: 480 readonly property int contentHeight: 626 readonly property int footerButtonsHeight: 44 - readonly property int labelFontSize1: root.Theme.primaryTextFontSize readonly property string instructionsLabelForQr: qsTr("How to display the QR code on your other device") readonly property string instructionsLabelForEncryptedKey: qsTr("How to copy the encrypted key from your other device") @@ -1022,8 +910,6 @@ QtObject { readonly property string dataImagePrefix: "data:image" - readonly property string mentionSpanTag: `` - readonly property string ens_taken: "taken" readonly property string ens_taken_custom: "taken-custom" readonly property string ens_owned: "owned" diff --git a/ui/main.qml b/ui/main.qml index 08a5d44c508..b1f328af706 100644 --- a/ui/main.qml +++ b/ui/main.qml @@ -700,27 +700,4 @@ Window { MobileUI { id: mobileUI } - - // Right now Constants holds not only true constant values but also expressions - // depending on dynamic theme system. In order to keep those expressions working - // as expected, explicit propagation of style must be established. This is workaround - // that should be fixed in the future by removing dependency on Theme attached - // property from Constants. - Binding { - target: Constants - property: "Theme.style" - value: applicationWindow.Theme.style - } - - Binding { - target: Constants - property: "Theme.padding" - value: applicationWindow.Theme.padding - } - - Binding { - target: Constants - property: "Theme.fontSizeOffset" - value: applicationWindow.Theme.fontSizeOffset - } }