From 6cb3a07500a202830728aa93c5d6202fa6626d89 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Wed, 6 Apr 2022 13:52:21 +0200 Subject: [PATCH] move reusable controls into controls/ subdir --- electrum/gui/qml/components/OpenWallet.qml | 2 ++ electrum/gui/qml/components/Receive.qml | 2 ++ electrum/gui/qml/components/Scan.qml | 2 ++ electrum/gui/qml/components/Wallets.qml | 2 ++ .../gui/qml/components/{ => controls}/InfoTextArea.qml | 2 +- .../gui/qml/components/{ => controls}/MessageDialog.qml | 0 electrum/gui/qml/components/{ => controls}/MessagePane.qml | 0 .../qml/components/{ => controls}/NotificationPopup.qml | 0 .../qml/components/{ => controls}/PaneInsetBackground.qml | 7 ------- electrum/gui/qml/components/{ => controls}/QRScan.qml | 0 .../gui/qml/components/{ => controls}/SeedTextArea.qml | 0 electrum/gui/qml/components/main.qml | 2 ++ electrum/gui/qml/components/wizard/WCAutoConnect.qml | 1 + electrum/gui/qml/components/wizard/WCBIP39Refine.qml | 1 + electrum/gui/qml/components/wizard/WCConfirmSeed.qml | 1 + electrum/gui/qml/components/wizard/WCCreateSeed.qml | 1 + electrum/gui/qml/components/wizard/WCHaveSeed.qml | 1 + 17 files changed, 16 insertions(+), 8 deletions(-) rename electrum/gui/qml/components/{ => controls}/InfoTextArea.qml (88%) rename electrum/gui/qml/components/{ => controls}/MessageDialog.qml (100%) rename electrum/gui/qml/components/{ => controls}/MessagePane.qml (100%) rename electrum/gui/qml/components/{ => controls}/NotificationPopup.qml (100%) rename electrum/gui/qml/components/{ => controls}/PaneInsetBackground.qml (81%) rename electrum/gui/qml/components/{ => controls}/QRScan.qml (100%) rename electrum/gui/qml/components/{ => controls}/SeedTextArea.qml (100%) diff --git a/electrum/gui/qml/components/OpenWallet.qml b/electrum/gui/qml/components/OpenWallet.qml index ea59d3030..4131a34fc 100644 --- a/electrum/gui/qml/components/OpenWallet.qml +++ b/electrum/gui/qml/components/OpenWallet.qml @@ -4,6 +4,8 @@ import QtQuick.Controls 2.1 import org.electrum 1.0 +import "controls" + Pane { id: openwalletdialog diff --git a/electrum/gui/qml/components/Receive.qml b/electrum/gui/qml/components/Receive.qml index 126fb4cbb..a082a4ffc 100644 --- a/electrum/gui/qml/components/Receive.qml +++ b/electrum/gui/qml/components/Receive.qml @@ -6,6 +6,8 @@ import QtQml.Models 2.1 import org.electrum 1.0 +import "controls" + Pane { id: rootItem visible: Daemon.currentWallet !== undefined diff --git a/electrum/gui/qml/components/Scan.qml b/electrum/gui/qml/components/Scan.qml index 5ad3d4344..22cb6443e 100644 --- a/electrum/gui/qml/components/Scan.qml +++ b/electrum/gui/qml/components/Scan.qml @@ -3,6 +3,8 @@ import QtQuick.Controls 2.0 import org.electrum 1.0 +import "controls" + Item { id: scanPage property string title: qsTr('Scan') diff --git a/electrum/gui/qml/components/Wallets.qml b/electrum/gui/qml/components/Wallets.qml index d4ca72a14..5393b6c34 100644 --- a/electrum/gui/qml/components/Wallets.qml +++ b/electrum/gui/qml/components/Wallets.qml @@ -5,6 +5,8 @@ import QtQuick.Controls.Material 2.0 import org.electrum 1.0 +import "controls" + Pane { id: rootItem diff --git a/electrum/gui/qml/components/InfoTextArea.qml b/electrum/gui/qml/components/controls/InfoTextArea.qml similarity index 88% rename from electrum/gui/qml/components/InfoTextArea.qml rename to electrum/gui/qml/components/controls/InfoTextArea.qml index 5f9d2dbec..45110c124 100644 --- a/electrum/gui/qml/components/InfoTextArea.qml +++ b/electrum/gui/qml/components/controls/InfoTextArea.qml @@ -37,7 +37,7 @@ GridLayout { } Image { - source: iconStyle == InfoTextArea.IconStyle.Info ? "../../icons/info.png" : InfoTextArea.IconStyle.Warn ? "../../icons/warning.png" : InfoTextArea.IconStyle.Error ? "../../icons/expired.png" : "" + source: iconStyle == InfoTextArea.IconStyle.Info ? "../../../icons/info.png" : InfoTextArea.IconStyle.Warn ? "../../../icons/warning.png" : InfoTextArea.IconStyle.Error ? "../../../icons/expired.png" : "" anchors.left: parent.left anchors.top: parent.top anchors.leftMargin: 16 diff --git a/electrum/gui/qml/components/MessageDialog.qml b/electrum/gui/qml/components/controls/MessageDialog.qml similarity index 100% rename from electrum/gui/qml/components/MessageDialog.qml rename to electrum/gui/qml/components/controls/MessageDialog.qml diff --git a/electrum/gui/qml/components/MessagePane.qml b/electrum/gui/qml/components/controls/MessagePane.qml similarity index 100% rename from electrum/gui/qml/components/MessagePane.qml rename to electrum/gui/qml/components/controls/MessagePane.qml diff --git a/electrum/gui/qml/components/NotificationPopup.qml b/electrum/gui/qml/components/controls/NotificationPopup.qml similarity index 100% rename from electrum/gui/qml/components/NotificationPopup.qml rename to electrum/gui/qml/components/controls/NotificationPopup.qml diff --git a/electrum/gui/qml/components/PaneInsetBackground.qml b/electrum/gui/qml/components/controls/PaneInsetBackground.qml similarity index 81% rename from electrum/gui/qml/components/PaneInsetBackground.qml rename to electrum/gui/qml/components/controls/PaneInsetBackground.qml index f9719969a..8d4c316ac 100644 --- a/electrum/gui/qml/components/PaneInsetBackground.qml +++ b/electrum/gui/qml/components/controls/PaneInsetBackground.qml @@ -23,11 +23,4 @@ Rectangle { color: Qt.lighter(Material.background, 1.50) } color: Qt.darker(Material.background, 1.15) - Image { - source: '../../icons/electrum_lightblue.svg' - anchors.centerIn: parent - sourceSize.width: 128 - sourceSize.height: 128 - opacity: 0.1 - } } diff --git a/electrum/gui/qml/components/QRScan.qml b/electrum/gui/qml/components/controls/QRScan.qml similarity index 100% rename from electrum/gui/qml/components/QRScan.qml rename to electrum/gui/qml/components/controls/QRScan.qml diff --git a/electrum/gui/qml/components/SeedTextArea.qml b/electrum/gui/qml/components/controls/SeedTextArea.qml similarity index 100% rename from electrum/gui/qml/components/SeedTextArea.qml rename to electrum/gui/qml/components/controls/SeedTextArea.qml diff --git a/electrum/gui/qml/components/main.qml b/electrum/gui/qml/components/main.qml index b175505ac..61398a093 100644 --- a/electrum/gui/qml/components/main.qml +++ b/electrum/gui/qml/components/main.qml @@ -6,6 +6,8 @@ import QtQuick.Controls.Material 2.0 import QtQml 2.6 import QtMultimedia 5.6 +import "controls" + ApplicationWindow { id: app diff --git a/electrum/gui/qml/components/wizard/WCAutoConnect.qml b/electrum/gui/qml/components/wizard/WCAutoConnect.qml index c06321036..9b15d533c 100644 --- a/electrum/gui/qml/components/wizard/WCAutoConnect.qml +++ b/electrum/gui/qml/components/wizard/WCAutoConnect.qml @@ -2,6 +2,7 @@ import QtQuick.Layouts 1.0 import QtQuick.Controls 2.1 import ".." +import "../controls" WizardComponent { valid: true diff --git a/electrum/gui/qml/components/wizard/WCBIP39Refine.qml b/electrum/gui/qml/components/wizard/WCBIP39Refine.qml index 872d712a7..27cb36dd4 100644 --- a/electrum/gui/qml/components/wizard/WCBIP39Refine.qml +++ b/electrum/gui/qml/components/wizard/WCBIP39Refine.qml @@ -5,6 +5,7 @@ import QtQuick.Controls 2.1 import org.electrum 1.0 import ".." +import "../controls" WizardComponent { valid: false diff --git a/electrum/gui/qml/components/wizard/WCConfirmSeed.qml b/electrum/gui/qml/components/wizard/WCConfirmSeed.qml index a6b21d81e..2440291c9 100644 --- a/electrum/gui/qml/components/wizard/WCConfirmSeed.qml +++ b/electrum/gui/qml/components/wizard/WCConfirmSeed.qml @@ -5,6 +5,7 @@ import QtQuick.Controls 2.1 import org.electrum 1.0 import ".." +import "../controls" WizardComponent { valid: false diff --git a/electrum/gui/qml/components/wizard/WCCreateSeed.qml b/electrum/gui/qml/components/wizard/WCCreateSeed.qml index 28fe2e0c7..7c172842e 100644 --- a/electrum/gui/qml/components/wizard/WCCreateSeed.qml +++ b/electrum/gui/qml/components/wizard/WCCreateSeed.qml @@ -5,6 +5,7 @@ import QtQuick.Controls 2.1 import org.electrum 1.0 import ".." +import "../controls" WizardComponent { valid: seedtext.text != '' diff --git a/electrum/gui/qml/components/wizard/WCHaveSeed.qml b/electrum/gui/qml/components/wizard/WCHaveSeed.qml index da0440d5d..18599fee6 100644 --- a/electrum/gui/qml/components/wizard/WCHaveSeed.qml +++ b/electrum/gui/qml/components/wizard/WCHaveSeed.qml @@ -6,6 +6,7 @@ import QtQuick.Controls.Material 2.0 import org.electrum 1.0 import ".." +import "../controls" WizardComponent { id: root