|
|
@ -12,7 +12,6 @@ CheckBox { |
|
|
|
|
|
|
|
|
|
|
|
property var _qgcPal: QGCPalette { colorGroupEnabled: enabled } |
|
|
|
property var _qgcPal: QGCPalette { colorGroupEnabled: enabled } |
|
|
|
property bool _noText: text === "" |
|
|
|
property bool _noText: text === "" |
|
|
|
property real _radius: ScreenTools.defaultFontPixelHeight * 0.16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
activeFocusOnPress: true |
|
|
|
activeFocusOnPress: true |
|
|
|
|
|
|
|
|
|
|
@ -35,19 +34,22 @@ CheckBox { |
|
|
|
indicator: Item { |
|
|
|
indicator: Item { |
|
|
|
implicitWidth: ScreenTools.checkBoxIndicatorSize |
|
|
|
implicitWidth: ScreenTools.checkBoxIndicatorSize |
|
|
|
implicitHeight: implicitWidth |
|
|
|
implicitHeight: implicitWidth |
|
|
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
Rectangle { |
|
|
|
anchors.fill: parent |
|
|
|
anchors.fill: parent |
|
|
|
radius: _radius |
|
|
|
color: _qgcPal.window |
|
|
|
border.color: "black" |
|
|
|
border.color: _qgcPal.text |
|
|
|
|
|
|
|
border.width: 1 |
|
|
|
opacity: control.checkedState === Qt.PartiallyChecked ? 0.5 : 1 |
|
|
|
opacity: control.checkedState === Qt.PartiallyChecked ? 0.5 : 1 |
|
|
|
|
|
|
|
QGCColoredImage { |
|
|
|
Rectangle { |
|
|
|
source: "/qmlimages/checkbox-check.svg" |
|
|
|
anchors.margins: parent.height / 4 |
|
|
|
color: _qgcPal.text |
|
|
|
anchors.fill: parent |
|
|
|
opacity: control.checkedState === Qt.Checked ? control.enabled ? 1 : 0.5 : 0 |
|
|
|
radius: _radius |
|
|
|
mipmap: true |
|
|
|
color: "black" |
|
|
|
fillMode: Image.PreserveAspectFit |
|
|
|
visible: control.checkedState === Qt.Checked |
|
|
|
width: parent.width * 0.75 |
|
|
|
|
|
|
|
height: width |
|
|
|
|
|
|
|
sourceSize.height: height |
|
|
|
|
|
|
|
anchors.centerIn: parent |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|