From d63a06e0ff7e75f85703a79116e54261ec4b5ea6 Mon Sep 17 00:00:00 2001
From: "littletux89@gmail.com" <littletux89@gmail.com>
Date: Fri, 3 Jan 2020 22:59:34 +0300
Subject: [PATCH] [+] Modified the DapRadioButton.

---
 widgets/DapRadioButton.qml        |  4 +++-
 widgets/DapRadioButtonForm.ui.qml | 39 +++++++++++++++++--------------
 2 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/widgets/DapRadioButton.qml b/widgets/DapRadioButton.qml
index 90662ac..a175756 100644
--- a/widgets/DapRadioButton.qml
+++ b/widgets/DapRadioButton.qml
@@ -1,4 +1,6 @@
 import QtQuick 2.4
 
-DapRadioButtonForm {
+DapRadioButtonForm
+{
+
 }
diff --git a/widgets/DapRadioButtonForm.ui.qml b/widgets/DapRadioButtonForm.ui.qml
index 9cdbb9d..41b89ef 100644
--- a/widgets/DapRadioButtonForm.ui.qml
+++ b/widgets/DapRadioButtonForm.ui.qml
@@ -17,8 +17,8 @@ RadioButton
     property alias backgroundColor:backgroundColor.color
     ///@detalis spaceIndicatorText The gap between the indicator and the text.
     property int spaceIndicatorText
-    ///@detalis indicatorBorderColor Border color indicator.
-    property string indicatorBorderColor
+    ///@detalis indicatorBorder Border indicator.
+    property alias indicatorBorder: indicatorRadioButton.border
     ///@detalis indicatorBackgroundColor Background color indicator.
     property string indicatorBackgroundColor
     ///@detalis indicatorInnerColorActiv Color of the inner circle in checked condition.
@@ -34,19 +34,23 @@ RadioButton
     id: customRadioButton
 
     ///Text Options.
-    contentItem: Text {
-        id: nameButton
-        anchors.left: parent.left
-        anchors.right: parent.right
-        anchors.leftMargin: customRadioButton.indicator.width + spaceIndicatorText
-        verticalAlignment: Text.AlignVCenter
-        anchors.verticalCenter: parent.verticalCenter
-        color: "#3E3853"
-        horizontalAlignment: Text.AlignLeft
-        text: qsTr("template")
-    }
-        ///Indicator Options.
-        indicator: Rectangle {
+    contentItem:
+        Text
+        {
+            id: nameButton
+            anchors.left: parent.left
+            anchors.right: parent.right
+            anchors.leftMargin: customRadioButton.indicator.width + spaceIndicatorText
+            verticalAlignment: Text.AlignVCenter
+            anchors.verticalCenter: parent.verticalCenter
+            color: "#3E3853"
+            horizontalAlignment: Text.AlignLeft
+            text: qsTr("template")
+        }
+    ///Indicator Options.
+    indicator:
+        Rectangle
+        {
             id: indicatorRadioButton
             implicitWidth: indicatorSize
             implicitHeight: indicatorSize
@@ -54,16 +58,17 @@ RadioButton
             y: parent.height / 2 - height / 2
             radius: indicatorSize/2
             color: indicatorBackgroundColor
-            border.color: indicatorBorderColor
 
             ///Indicator inner options.
-            Rectangle {
+            Rectangle
+            {
                 width: indicatorInnerSize
                 height: indicatorInnerSize
                 x: (indicatorRadioButton.width/2)-(width/2)
                 y: (indicatorRadioButton.height/2)-(height/2)
                 radius: indicatorInnerSize/2
                 color: customRadioButton.checked ? indicatorInnerColorActiv : indicatorInnerColorNormal
+                visible: customRadioButton.checked
             }
         }
     ///Background options.
-- 
GitLab