From b46bd4e788986ce833715f715f5c6faa58392215 Mon Sep 17 00:00:00 2001
From: "aleksandr.martynov" <aleksandr.martynov@demlabs.net>
Date: Wed, 4 Dec 2019 15:03:55 +0300
Subject: [PATCH] [+] impliment default radiobutton to add wallet form

---
 CellFrameDashboardGUI/qml.qrc                 |  3 +-
 .../screen/LastAction/DapRadioButton.qml      | 34 +++++++++++++
 .../DapUiQmlScreenDialogAddWalletForm.ui.qml  | 50 ++++---------------
 3 files changed, 47 insertions(+), 40 deletions(-)
 create mode 100644 CellFrameDashboardGUI/screen/LastAction/DapRadioButton.qml

diff --git a/CellFrameDashboardGUI/qml.qrc b/CellFrameDashboardGUI/qml.qrc
index 8696bb5a5..30210d843 100755
--- a/CellFrameDashboardGUI/qml.qrc
+++ b/CellFrameDashboardGUI/qml.qrc
@@ -81,6 +81,7 @@
         <file>screen/LastAction/DapUiQmlWidgetRightPanelForm.ui.qml</file>
         <file>screen/LastAction/DapUiQmlWidgetScreenDialogAddWallet.ui.qml</file>
         <file>screen/LastAction/DapUiQmlWidgetSignatureTypeComboBox.qml</file>
+        <file>screen/LastAction/DapUiQmlWidgetSignatureTypeComboBox.qml</file>
         <file>screen/Log/DapUiQmlWidgetChainNodeLogs.qml</file>
         <file>screen/Log/DapUiQmlWidgetChainNodeLogsForm.ui.qml</file>
         <file>screen/Settings/DapUiQmlScreenSettings.qml</file>
@@ -97,6 +98,6 @@
         <file>screen/VPN/DapUiQmlWidgetSettingsVpn.qml</file>
         <file>screen/VPN/DapUiQmlWidgetSettingsVpnComboBox.qml</file>
         <file>screen/VPN/DapUiQmlWidgetSettingsVpnComboBoxForm.ui.qml</file>
-        <file>screen/VPN/DapUiQmlWidgetSettingsVpnForm.ui.qml</file>
+        <file>screen/VPN/DapRadioButton.qml</file>
     </qresource>
 </RCC>
diff --git a/CellFrameDashboardGUI/screen/LastAction/DapRadioButton.qml b/CellFrameDashboardGUI/screen/LastAction/DapRadioButton.qml
new file mode 100644
index 000000000..db360767b
--- /dev/null
+++ b/CellFrameDashboardGUI/screen/LastAction/DapRadioButton.qml
@@ -0,0 +1,34 @@
+import QtQuick 2.12
+import QtQuick.Controls 2.12
+
+RadioButton {
+    property alias textButton: nameButton.text
+    property string colorName: nameButton.color
+
+    id: button
+    text: qsTr("template")
+    contentItem: Text {
+        id: nameButton
+        anchors.left: parent.left
+        anchors.leftMargin: button.indicator.width + button.spacing
+        verticalAlignment: Text.AlignVCenter
+        anchors.verticalCenter: parent.verticalCenter
+        color: "#3E3853"
+        font.pointSize: 14
+        font.wordSpacing: 0
+        font.family: "Roboto"
+        horizontalAlignment: Text.AlignLeft
+    }
+
+    spacing: 16
+    checked: false
+    display: AbstractButton.TextBesideIcon
+    autoExclusive: true
+}
+
+
+/*##^##
+Designer {
+    D{i:0;autoSize:true;height:480;width:640}
+}
+##^##*/
diff --git a/CellFrameDashboardGUI/screen/LastAction/DapUiQmlScreenDialogAddWalletForm.ui.qml b/CellFrameDashboardGUI/screen/LastAction/DapUiQmlScreenDialogAddWalletForm.ui.qml
index fe98755cf..9880edcd1 100644
--- a/CellFrameDashboardGUI/screen/LastAction/DapUiQmlScreenDialogAddWalletForm.ui.qml
+++ b/CellFrameDashboardGUI/screen/LastAction/DapUiQmlScreenDialogAddWalletForm.ui.qml
@@ -136,61 +136,33 @@ DapUiQmlScreen {
     ColumnLayout {
         id: chooseRecoveryMethod
         height: 272
-        anchors.leftMargin: 1
         spacing: 32
         anchors.top: recoveryMethodTextArea.bottom
+        anchors.topMargin: 32
         anchors.left: parent.left
+        anchors.leftMargin: 16
         anchors.right: parent.right
+        Layout.alignment: Qt.AlignLeft | Qt.AlignTop
 
-        RadioButton {
+        DapRadioButton {
             id: selectionWords
-            text: qsTr("24 words")
-            Layout.alignment: Qt.AlignLeft | Qt.AlignTop
-            Layout.topMargin: 32
+            textButton: qsTr("24 words")
             checked: true
-            spacing: 16
-            autoExclusive: true
-            display: AbstractButton.TextBesideIcon
-            font.pointSize: 14
-            font.wordSpacing: 0
-            font.family: "Roboto"
-            Layout.leftMargin: 16
         }
 
-        RadioButton {
+        DapRadioButton {
             id: selectionQRcode
-            y: 120
-            text: qsTr("QR code")
-            Layout.alignment: Qt.AlignLeft | Qt.AlignTop
-            Layout.topMargin: 0
-            Layout.leftMargin: 16
-            spacing: 16
-            font.pointSize: 14
-            font.family: "Roboto"
+            textButton: qsTr("QR code")
         }
 
-        RadioButton {
+        DapRadioButton {
             id: selectionExportToFile
-            text: qsTr("Export to file")
-            spacing: 16
-            font.pointSize: 14
-            font.family: "Roboto"
-            Layout.alignment: Qt.AlignLeft | Qt.AlignTop
-            Layout.topMargin: 0
-            Layout.leftMargin: 16
+            textButton: qsTr("Export to file")
         }
 
-        RadioButton {
+        DapRadioButton {
             id: selectionNothing
-            y: 235
-            text: qsTr("Nothing")
-            spacing: 16
-            checked: false
-            font.family: "Roboto"
-            font.pointSize: 14
-            Layout.alignment: Qt.AlignLeft | Qt.AlignTop
-            Layout.topMargin: 0
-            Layout.leftMargin: 16
+            textButton: qsTr("Nothing")
         }
     }
 
-- 
GitLab