uiux: fine-tune StatusSwitch and StatusRadioButton components
This commit is contained in:
parent
afcb61397f
commit
18797970db
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue