From 63ae662b3720f40d6ac010faa855a4b19b9b360e Mon Sep 17 00:00:00 2001
From: Konstantin <djtv01@gmail.com>
Date: Mon, 2 Dec 2019 23:05:31 +0300
Subject: [PATCH] The old combobox files are deleted and the new ones are
 created in the submodule

---
 .../DapUiQmlScreenExchangeForm.ui.qml         |  9 +-
 .../DapUiQmlWidgetExchangeComboBox.qml        |  5 +-
 .../DapUiQmlWidgetStatusBar.qml               | 41 ++++++++-
 .../DapUiQmlWidgetStatusBarComboBox.qml       | 87 -------------------
 ...apUiQmlWidgetStatusBarComboBoxDelegate.qml | 36 --------
 .../DapUiQmlWidgetStatusBarComboBoxWallet.qml | 44 ----------
 ...mlWidgetStatusBarComboBoxWalletForm.ui.qml |  6 --
 .../DapUiQmlWidgetStatusBarContentItem.qml    | 11 ---
 CellFrameDashboardGUI/qml.qrc                 |  5 --
 9 files changed, 47 insertions(+), 197 deletions(-)
 delete mode 100644 CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBox.qml
 delete mode 100644 CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxDelegate.qml
 delete mode 100644 CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxWallet.qml
 delete mode 100644 CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxWalletForm.ui.qml
 delete mode 100644 CellFrameDashboardGUI/DapUiQmlWidgetStatusBarContentItem.qml

diff --git a/CellFrameDashboardGUI/DapUiQmlScreenExchangeForm.ui.qml b/CellFrameDashboardGUI/DapUiQmlScreenExchangeForm.ui.qml
index 3143fde44..4d7b05147 100644
--- a/CellFrameDashboardGUI/DapUiQmlScreenExchangeForm.ui.qml
+++ b/CellFrameDashboardGUI/DapUiQmlScreenExchangeForm.ui.qml
@@ -22,8 +22,8 @@ Page {
             anchors.left: topPanelExchange.left
             width:144 * pt
             height:parent.height
-            DapUiQmlWidgetExchangeComboBox{
 
+            DapComboBox{
                 model: ListModel{
                     id:сonversionList
                     ListElement{text:"TKN1/NGD"}
@@ -32,6 +32,9 @@ Page {
                     ListElement{text:"KLVN/USD"}
                 }
             }
+//            DapUiQmlWidgetExchangeComboBox{
+
+//            }
         }
         ///Time ComboBox
         Rectangle{
@@ -41,7 +44,7 @@ Page {
             anchors.top: topPanelExchange.top
             width:132 * pt
             height:parent.height
-            DapUiQmlWidgetExchangeComboBox{
+            DapComboBox{
                 model: ListModel{
                     ListElement{text:"1 minute"}
                     ListElement{text:"5 minute"}
@@ -52,7 +55,7 @@ Page {
                     ListElement{text:"12 hour"}
                     ListElement{text:"24 hour"}
                 }
-                    font.pixelSize: 14*pt
+                fontSizeComboBox: 14*pt
             }
         }
         ///Value Last price
diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetExchangeComboBox.qml b/CellFrameDashboardGUI/DapUiQmlWidgetExchangeComboBox.qml
index b8e3e982b..21152a57d 100644
--- a/CellFrameDashboardGUI/DapUiQmlWidgetExchangeComboBox.qml
+++ b/CellFrameDashboardGUI/DapUiQmlWidgetExchangeComboBox.qml
@@ -6,7 +6,7 @@ DapUiQmlWidgetStatusBarComboBox {
     fontSizeDelegateComboBox: 16*pt
 
     indicator: Image {
-        id: imageIndicator
+       // id: imageIndicator
         source: parent.popup.visible ? "qrc:/Resources/Icons/ic_arrow_drop_up_dark_blue.png" : "qrc:/Resources/Icons/ic_arrow_drop_down_dark_blue.png"
         width: 24 * pt
         height: 24 * pt
@@ -17,7 +17,6 @@ DapUiQmlWidgetStatusBarComboBox {
 
     contentItem: Text {
         id: headerText
-
         anchors.fill: parent
         anchors.leftMargin: 16 * pt
         anchors.topMargin: 12 * pt
@@ -25,7 +24,7 @@ DapUiQmlWidgetStatusBarComboBox {
         font.family: fontRobotoRegular.name
         font.pixelSize: 16 * pt
         color: hilightColor
-        verticalAlignment: Text.AlignTop       
+        verticalAlignment: Text.AlignTop
     }
     hilightColor: "#070023"
 }
diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBar.qml b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBar.qml
index 81ae55653..8fcb5d633 100644
--- a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBar.qml
+++ b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBar.qml
@@ -31,14 +31,51 @@ Rectangle {
                 color: "#A7A7A7"
             }
 
-            DapUiQmlWidgetStatusBarComboBoxWallet {
+            DapComboBox {
                 id: comboboxWallet
                 width: 190*pt
                 anchors.top: parent.top
                 anchors.bottom: parent.bottom
-                fieldBalance: fieldWalletBalance
+
+                property Label fieldBalance: Label {}
+                model: dapWalletModel.wallets
+              //  fieldBalance: fieldWalletBalance
+
+                indicator: Image {
+                    id: arrow
+                    source: parent.popup.visible ? "qrc:/Resources/Icons/ic_arrow_drop_up.png" : "qrc:/Resources/Icons/ic_arrow_drop_down.png"
+                    width: 24 * pt
+                    height: 24 * pt
+                    anchors.verticalCenter: parent.verticalCenter
+                    anchors.right: parent.right
+                    anchors.rightMargin: 16 * pt
+                }
+                contentItem: Text {
+                    id: headerText
+                    anchors.fill: parent
+                    anchors.leftMargin: 12 * pt
+                    anchors.rightMargin: 48 * pt
+                    anchors.topMargin: 10 * pt
+                    text: parent.displayText
+                    font.family: fontRobotoRegular.name
+                    font.pixelSize: 14 * pt
+                    color: parent.popup.visible ? "#332F49" : "#FFFFFF"
+                    verticalAlignment: Text.AlignTop
+                    elide: Text.ElideRight
+                }
+                hilightColor: "#332F49"
+                fontSizeComboBox: 14*px
+                hilightColorText: "#FFFFFF"
             }
 
+//            DapUiQmlWidgetStatusBarComboBoxWallet {
+//                id: comboboxWallet
+//                width: 190*pt
+//                anchors.top: parent.top
+//                anchors.bottom: parent.bottom
+//                //fieldBalance: fieldWalletBalance
+//            }
+
             Label {
                 id: titleWalletBalance
                 anchors.top: parent.top
diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBox.qml b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBox.qml
deleted file mode 100644
index 52434a4e3..000000000
--- a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBox.qml
+++ /dev/null
@@ -1,87 +0,0 @@
-import QtQuick 2.0
-import QtQuick.Controls 2.5
-import QtQuick.Controls.Styles 1.4
-import QtGraphicalEffects 1.0
-
-///This file will be moved to libdap and removed from here.
-///this comboBox used int top panel exchange and statusBar will be deleted in the future
-ComboBox {
-    property alias headerTextColor: headerText.color
-    property alias widthArrow: arrow.width
-    property alias heightArrow: arrow.height
-    property string hilightColor: "#332F49";
-    property int fontSizeDelegateComboBox: 14*pt//textDelegateComboBox.font.pixelSize
-    id: customComboBox
-    width: parent.width
-    height: parent.height
-
-    delegate:DapUiQmlWidgetStatusBarComboBoxDelegate{delegateContentText: modelData;}
-
-    indicator: Image {
-        id: arrow
-        source: parent.popup.visible ? "qrc:/Resources/Icons/ic_arrow_drop_up.png" : "qrc:/Resources/Icons/ic_arrow_drop_down.png"
-        width: 24 * pt
-        height: 24 * pt
-        anchors.verticalCenter: parent.verticalCenter
-        anchors.right: parent.right
-        anchors.rightMargin: 16 * pt
-    }
-
-    background: Rectangle {
-        anchors.fill: parent
-        color: parent.popup.visible ? "#FFFFFF" : "transparent"
-        radius: 2 * pt
-        height: parent.height
-
-    }
-
-    contentItem: Text {
-        id: headerText
-        anchors.fill: parent
-        anchors.leftMargin: 12 * pt
-        anchors.rightMargin: 48 * pt
-        anchors.topMargin: 10 * pt
-        text: parent.displayText
-        font.family: fontRobotoRegular.name
-        font.pixelSize: parent.font.pixelSize
-        color: parent.popup.visible ? hilightColor : "#FFFFFF"
-        verticalAlignment: Text.AlignTop
-        elide: Text.ElideRight
-    }
-
-    popup: Popup {
-        y: parent.height - 1
-        width: parent.width + 1
-        padding: 1
-        contentItem: ListView {
-            clip: true
-            implicitHeight: contentHeight
-            model: customComboBox.popup.visible ? customComboBox.delegateModel : null
-            ScrollIndicator.vertical: ScrollIndicator { }
-        }
-
-        background: Rectangle {
-            width: customComboBox.background.width
-            Rectangle {
-                id: contentCorner
-                anchors.fill: parent
-            }
-
-            DropShadow {
-                anchors.fill: parent
-                source: contentCorner
-                verticalOffset: 9 * pt
-                samples: 13 * pt
-                color: "#40000000"
-            }
-        }
-    }
-
-    DropShadow {
-        anchors.fill: parent
-        source: background
-        verticalOffset: 9 * pt
-        samples: 13 * pt
-        color: "#40000000"
-    }
-}
diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxDelegate.qml b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxDelegate.qml
deleted file mode 100644
index 379ade802..000000000
--- a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxDelegate.qml
+++ /dev/null
@@ -1,36 +0,0 @@
-import QtQuick 2.0
-import QtQuick.Controls 2.5
-
-///This file will be deleted in feature 2708
-ItemDelegate {
-    property string delegateContentText: ""
-    width: parent.width
-    height:{
-        if(index == currentIndex) return 0
-            else
-                return 42*pt
-    }
-    contentItem: DapUiQmlWidgetStatusBarContentItem {
-        id:textDelegateComboBox
-        anchors.fill: parent
-        anchors.topMargin: 8 * pt
-        anchors.leftMargin: 16 * pt
-        verticalAlignment: Qt.AlignTop
-        Text{
-            font.pixelSize: fontSizeDelegateComboBox
-            text: delegateContentText
-            color: hovered ? "#FFFFFF" : "#332F49"
-        }
-
-
-    }
-
-    background: Rectangle {
-        anchors.fill: parent
-        anchors.bottomMargin: 10 * pt
-        color: hovered ? hilightColor : "#FFFFFF"
-    }
-
-    highlighted: parent.highlightedIndex === index
-
-}
diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxWallet.qml b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxWallet.qml
deleted file mode 100644
index 016a7cb86..000000000
--- a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxWallet.qml
+++ /dev/null
@@ -1,44 +0,0 @@
-import QtQuick 2.4
-import QtQuick.Controls 2.5
-import QtQuick.Controls.Styles 1.4
-import QtGraphicalEffects 1.0
-import QtQml 2.13
-
-///This file will be deleted in feature 2708
-DapUiQmlWidgetStatusBarComboBoxWalletForm {
-    property Label fieldBalance: Label {}
-    model: dapWalletModel.wallets
-
-    indicator: Image {
-        id: arrow
-        source: parent.popup.visible ? "qrc:/Resources/Icons/ic_arrow_drop_up.png" : "qrc:/Resources/Icons/ic_arrow_drop_down.png"
-        width: 24 * pt
-        height: 24 * pt
-        anchors.verticalCenter: parent.verticalCenter
-        anchors.right: parent.right
-        anchors.rightMargin: 16 * pt
-    }
-
-    contentItem: Text {
-        id: headerText
-        anchors.fill: parent
-        anchors.leftMargin: 12 * pt
-        anchors.rightMargin: 48 * pt
-        anchors.topMargin: 10 * pt
-        text: parent.displayText
-        font.family: fontRobotoRegular.name
-        font.pixelSize: 14 * pt
-        color: parent.popup.visible ? "#332F49" : "#FFFFFF"
-        verticalAlignment: Text.AlignTop
-        elide: Text.ElideRight
-    }
-
-    delegate: DapUiQmlWidgetStatusBarComboBoxDelegate {
-        delegateContentText: modelData
-    }
-
-    onCurrentTextChanged: {
-        dapWalletFilterModel.setWalletFilter(currentText);
-
-    }
-}
diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxWalletForm.ui.qml b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxWalletForm.ui.qml
deleted file mode 100644
index 438dbfbf4..000000000
--- a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxWalletForm.ui.qml
+++ /dev/null
@@ -1,6 +0,0 @@
-import QtQuick 2.4
-
-
-DapUiQmlWidgetStatusBarComboBox {
-
-}
diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarContentItem.qml b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarContentItem.qml
deleted file mode 100644
index 1296e1d76..000000000
--- a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarContentItem.qml
+++ /dev/null
@@ -1,11 +0,0 @@
-import QtQuick 2.0
-import QtQuick.Controls 2.5
-import QtQuick.Controls.Styles 1.4
-
-Text {
-    color: "#A7A7A7"
-    font.family: fontRobotoRegular.name
-    font.pixelSize: parent.font.pixelSize
-    elide: Text.ElideRight
-    verticalAlignment: Text.AlignVCenter
-}
diff --git a/CellFrameDashboardGUI/qml.qrc b/CellFrameDashboardGUI/qml.qrc
index 24c85f2bc..a9be976ad 100755
--- a/CellFrameDashboardGUI/qml.qrc
+++ b/CellFrameDashboardGUI/qml.qrc
@@ -64,16 +64,12 @@
         <file>Resources/Icons/ic_arrow_drop_down.png</file>
         <file>Resources/Icons/ic_arrow_drop_up.png</file>
         <file>DapUiQmlWidgetStatusBar.qml</file>
-        <file>DapUiQmlWidgetStatusBarComboBox.qml</file>
-        <file>DapUiQmlWidgetStatusBarContentItem.qml</file>
         <file>DapUiQmlWidgetSettingsNetwork.qml</file>
         <file>DapUiQmlWidgetSettingsNetworkForm.ui.qml</file>
         <file>DapUiQmlScreenSettings.qml</file>
         <file>DapUiQmlScreenSettingsForm.ui.qml</file>
         <file>DapUiQmlScreenSettingsSection.qml</file>
         <file>DapUiQmlWidgetStatusBarButton.ui.qml</file>
-        <file>DapUiQmlWidgetStatusBarComboBoxWallet.qml</file>
-        <file>DapUiQmlWidgetStatusBarComboBoxWalletForm.ui.qml</file>
         <file>DapUiQmlWidgetStatusBarComboBoxToken.qml</file>
         <file>DapUiQmlWidgetStatusBarComboBoxTokenForm.ui.qml</file>
         <file>Resources/Icons/icon_settings.png</file>
@@ -84,7 +80,6 @@
         <file>DapUiQmlWidgetSettingsVpnForm.ui.qml</file>
         <file>DapUiQmlWidgetSettingsVpnComboBox.qml</file>
         <file>DapUiQmlWidgetSettingsVpnComboBoxForm.ui.qml</file>
-        <file>DapUiQmlWidgetStatusBarComboBoxDelegate.qml</file>
         <file>DapUiQmlWidgetDashboardTokenSectionDelegate.qml</file>
         <file>DapUiQmlScreenDialogAddWalletForm.ui.qml</file>
         <file>DapUiQmlWidgetSignatureTypeComboBox.qml</file>
-- 
GitLab