uiux: fine-tune StatusSwitch and StatusRadioButton components

This commit is contained in:
Pascal Precht 2020-09-18 14:22:33 +02:00 committed by Iuri Matias
parent afcb61397f
commit 18797970db
2 changed files with 6 additions and 6 deletions

View File

@ -9,8 +9,8 @@ RadioButton {
indicator: Rectangle {
implicitWidth: 20
implicitHeight: 20
x: control.leftPadding
y: 4
x: 0
y: 6
radius: 10
color: control.checked ? Style.current.blue : Style.current.grey
@ -27,6 +27,8 @@ RadioButton {
contentItem: StyledText {
text: control.text
color: Style.current.textColor
leftPadding: control.indicator.width + control.spacing
verticalAlignment: Text.AlignVCenter
leftPadding: !!control.text ? control.indicator.width + control.spacing : control.indicator.width
font.pixelSize: 15
}
}

View File

@ -6,8 +6,6 @@ import "../../shared"
Switch {
id: control
//% "Switch"
text: qsTrId("switch")
indicator: Rectangle {
implicitWidth: 52
@ -41,7 +39,7 @@ Switch {
text: control.text
opacity: enabled ? 1.0 : 0.3
verticalAlignment: Text.AlignVCenter
leftPadding: control.indicator.width + control.spacing
leftPadding: !!control.text ? control.indicator.width + control.spacing : control.indicator.width
}
}