From 7647b1d3828950861a69a0f713025d6be512d0c3 Mon Sep 17 00:00:00 2001 From: "andrey.daragan" <daragan.andrey@demlabs.net> Date: Fri, 3 Jan 2020 20:13:39 +0000 Subject: [PATCH] Bugs 2893 --- widgets/DapButtonForm.ui.qml | 3 ++- widgets/DapRadioButton.qml | 4 +++- widgets/DapRadioButtonForm.ui.qml | 37 ++++++++++++++++++------------- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/widgets/DapButtonForm.ui.qml b/widgets/DapButtonForm.ui.qml index e274195..6f2ac48 100644 --- a/widgets/DapButtonForm.ui.qml +++ b/widgets/DapButtonForm.ui.qml @@ -1,7 +1,8 @@ import QtQuick 2.0 import QtQuick.Controls 2.0 -Button { +Button +{ ///@detalis heightButton Button height. property int heightButton ///@detalis widthButton Button width. 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..c972fb6 100644 --- a/widgets/DapRadioButtonForm.ui.qml +++ b/widgets/DapRadioButtonForm.ui.qml @@ -17,6 +17,8 @@ RadioButton property alias backgroundColor:backgroundColor.color ///@detalis spaceIndicatorText The gap between the indicator and the text. property int spaceIndicatorText + ///@detalis indicatorBorder Border indicator. + property alias indicatorBorder: indicatorRadioButton.border ///@detalis indicatorBorderColor Border color indicator. property string indicatorBorderColor ///@detalis indicatorBackgroundColor Background color indicator. @@ -34,19 +36,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 +60,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