diff options
Diffstat (limited to 'src/imports/controls/CheckBox.qml')
-rw-r--r-- | src/imports/controls/CheckBox.qml | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/imports/controls/CheckBox.qml b/src/imports/controls/CheckBox.qml index 4348781d..ec539b19 100644 --- a/src/imports/controls/CheckBox.qml +++ b/src/imports/controls/CheckBox.qml @@ -52,10 +52,35 @@ T.CheckBox { padding: 6 spacing: 6 - indicator: CheckIndicator { + // keep in sync with CheckDelegate.qml (shared CheckIndicator.qml was removed for performance reasons) + indicator: Rectangle { + implicitWidth: 28 + implicitHeight: 28 + x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2 y: control.topPadding + (control.availableHeight - height) / 2 - control: control + + color: control.down ? control.palette.light : control.palette.base + border.width: control.visualFocus ? 2 : 1 + border.color: control.visualFocus ? control.palette.highlight : control.palette.mid + + ColorImage { + x: (parent.width - width) / 2 + y: (parent.height - height) / 2 + defaultColor: "#353637" + color: control.palette.text + source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png" + visible: control.checkState === Qt.Checked + } + + Rectangle { + x: (parent.width - width) / 2 + y: (parent.height - height) / 2 + width: 16 + height: 3 + color: control.palette.text + visible: control.checkState === Qt.PartiallyChecked + } } contentItem: CheckLabel { |