diff --git a/custom-example/res/Custom/Widgets/CustomOnOffSwitch.qml b/custom-example/res/Custom/Widgets/CustomOnOffSwitch.qml index 9c9a86693c6f7215c165442353aa247960e09fc5..32b42cdeb937c2f61aaf0c456d579650f412c963 100644 --- a/custom-example/res/Custom/Widgets/CustomOnOffSwitch.qml +++ b/custom-example/res/Custom/Widgets/CustomOnOffSwitch.qml @@ -20,8 +20,8 @@ Rectangle { height: Math.round(ScreenTools.defaultFontPixelHeight * 2) width: ScreenTools.defaultFontPixelWidth * 10 color: qgcPal.button - border.color: qgcPal.text - border.width: 1 + border.color: qgcPal.windowShade + border.width: 0 property bool checked: true @@ -32,24 +32,23 @@ Rectangle { Rectangle { width: parent.width * 0.5 height: parent.height - color: qgcPal.windowShade - visible: !checked + color: checked ? qgcPal.button : qgcPal.buttonHighlight border.color: qgcPal.text - border.width: 1 + border.width: 0 anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter QGCLabel { text: qsTr("Off") anchors.centerIn: parent + color: qgcPal.text } } Rectangle { width: parent.width * 0.5 height: parent.height * 0.95 - color: qgcPal.buttonHighlight - visible: checked + color: checked ? qgcPal.buttonHighlight : qgcPal.button border.color: qgcPal.text - border.width: 1 + border.width: 0 anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter QGCLabel {