From 7b490c2c718ab341af1b1f74f49aec20fb45101e Mon Sep 17 00:00:00 2001
From: Konstantin <djtv01@gmail.com>
Date: Mon, 9 Dec 2019 23:14:44 +0300
Subject: [PATCH] 09/12/2019

---
 DapComboBox.qml         | 37 ++++++++++++++++++++++++++-----------
 DapComboBoxDelegate.qml |  2 +-
 2 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/DapComboBox.qml b/DapComboBox.qml
index ae73617..bb8f8f0 100644
--- a/DapComboBox.qml
+++ b/DapComboBox.qml
@@ -1,27 +1,42 @@
-import QtQuick 2.0
-import QtQuick.Controls 2.5
+import QtQuick 2.0
+import QtQuick.Controls 2.2
 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
 ///About property
-/// hilightColor - color of the selected item
-/// fontSizeComboBox - font size for the entire widget
-///widthPopupComboBoxActive and widthPopupComboBoxNormal - width of the combo box
+///@hilightColor - color of the selected item
+///@fontSizeComboBox - font size for the entire widget
+///@widthPopupComboBoxActive and @widthPopupComboBoxNormal - width of the combo box
 ///                                                 in the active state and in the normal state
-///spacingEdgeActive and spacingEdgeNormal - padding width of the combo box in the active state
+///@sidePaddingActive and @sidePaddingNormal - padding width of the combo box in the active state
 ///                                                                     and in the normal state
+///@sidePaddingActive and @sidePaddingNormal - sets the indent from the edge of the right and left
+///                                           edges of the parent in the active and normal state
+///@topIndentActive and @topIndentNormal
+///@bottomIndentActive and @bottomIndentNormal
+/// - sets the indent from the edge of the upper and lower edges of the parent in the active and normal state
+
 ComboBox {
+
     property string normalColorText: "#070023"
     property string hilightColorText: "#FFFFFF"
     property string normalColor: "#FFFFFF"
     property string hilightColor: "#330F54"
     property int fontSizeComboBox: 16*pt
+
     property int widthPopupComboBoxActive: parent.width
     property int widthPopupComboBoxNormal: parent.width
-    property int spacingEdgeActive:16 * pt
-    property int spacingEdgeNormal:16 * pt
+
+    property int sidePaddingActive:16 * pt
+    property int sidePaddingNormal:16 * pt
+
+    property int topIndentActive:12 * pt
+    property int topIndentNormal:12 * pt
+
+    property int bottomIndentActive:14 * pt
+    property int bottomIndentNormal:14 * pt
 
 
     id: customComboBox
@@ -36,7 +51,7 @@ ComboBox {
         height: 24 * pt
         anchors.verticalCenter: parent.verticalCenter
         anchors.right: parent.right
-        anchors.rightMargin: popup.visible ? spacingEdgeActive : spacingEdgeNormal
+        anchors.rightMargin: popup.visible ? sidePaddingActive : sidePaddingNormal
     }
 
     background: Rectangle {
@@ -49,8 +64,8 @@ ComboBox {
 
     contentItem: Text {
         anchors.fill: parent
-        anchors.leftMargin: popup.visible ? spacingEdgeActive : spacingEdgeNormal
-        anchors.topMargin: 12 * pt
+        anchors.leftMargin: popup.visible ? sidePaddingActive : sidePaddingNormal
+        anchors.topMargin: popup.visible ? topIndentActive : topIndentNormal
         text: parent.displayText
         font.family: fontRobotoRegular.name
         font.pixelSize: fontSizeComboBox
diff --git a/DapComboBoxDelegate.qml b/DapComboBoxDelegate.qml
index 5f159a7..55db1e5 100644
--- a/DapComboBoxDelegate.qml
+++ b/DapComboBoxDelegate.qml
@@ -12,7 +12,7 @@ ItemDelegate {
         id:textDelegateComboBox
         anchors.fill: parent
         anchors.topMargin: 8 * pt
-        anchors.leftMargin: popup.visible ? spacingEdgeActive : spacingEdgeNormal
+        anchors.leftMargin: popup.visible ? sidePaddingActive : sidePaddingNormal
         verticalAlignment: Qt.AlignTop
         font.family: fontRobotoRegular.name
             font.pixelSize: fontSizeComboBox
-- 
GitLab