diff --git a/qgcresources.qrc b/qgcresources.qrc index 3a3f6767ed5a67b46a2f735c84e5b921047d4036..bee3713fda3b49b790d9abf0754aa6d658d79318 100644 --- a/qgcresources.qrc +++ b/qgcresources.qrc @@ -55,7 +55,7 @@ resources/camera.svg src/Camera/images/camera_photo.svg src/Camera/images/camera_video.svg - src/QmlControls/check.png + src/QmlControls/checkbox-check.svg src/VehicleSetup/FirmwareUpgradeIcon.png src/AutoPilotPlugins/PX4/Images/FlightModesComponentIcon.png src/AutoPilotPlugins/PX4/Images/CameraTrigger.svg diff --git a/src/QmlControls/QGCCheckBox.qml b/src/QmlControls/QGCCheckBox.qml index 9292f7cac49612d985d5a9f73bddd115efa6682f..20f5efe87c9e16787a700360f44cba6f62a01c89 100644 --- a/src/QmlControls/QGCCheckBox.qml +++ b/src/QmlControls/QGCCheckBox.qml @@ -12,7 +12,6 @@ CheckBox { property var _qgcPal: QGCPalette { colorGroupEnabled: enabled } property bool _noText: text === "" - property real _radius: ScreenTools.defaultFontPixelHeight * 0.16 activeFocusOnPress: true @@ -35,19 +34,22 @@ CheckBox { indicator: Item { implicitWidth: ScreenTools.checkBoxIndicatorSize implicitHeight: implicitWidth - Rectangle { anchors.fill: parent - radius: _radius - border.color: "black" + color: _qgcPal.window + border.color: _qgcPal.text + border.width: 1 opacity: control.checkedState === Qt.PartiallyChecked ? 0.5 : 1 - - Rectangle { - anchors.margins: parent.height / 4 - anchors.fill: parent - radius: _radius - color: "black" - visible: control.checkedState === Qt.Checked + QGCColoredImage { + source: "/qmlimages/checkbox-check.svg" + color: _qgcPal.text + opacity: control.checkedState === Qt.Checked ? control.enabled ? 1 : 0.5 : 0 + mipmap: true + fillMode: Image.PreserveAspectFit + width: parent.width * 0.75 + height: width + sourceSize.height: height + anchors.centerIn: parent } } } diff --git a/src/QmlControls/check.png b/src/QmlControls/check.png deleted file mode 100644 index ad1df9572e99cebd676eaa8db86a66593b2f5345..0000000000000000000000000000000000000000 Binary files a/src/QmlControls/check.png and /dev/null differ diff --git a/src/QmlControls/checkbox-check.svg b/src/QmlControls/checkbox-check.svg new file mode 100644 index 0000000000000000000000000000000000000000..f030d4485cd7995d5bc09a54bcdf5e7c48c0e87b --- /dev/null +++ b/src/QmlControls/checkbox-check.svg @@ -0,0 +1,11 @@ + + + + + +