aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/CheckIndicator.qml
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-04-28 03:01:34 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-04-28 03:01:34 +0200
commit012556df80470e294c1adaf1b442e1eb8729c598 (patch)
tree1871aaa41c9eaabd27b64d34458d02f85995f187 /src/imports/controls/material/CheckIndicator.qml
parent5df2972e560dab4a1778444dc1dbe0c95c86be21 (diff)
parentbc93333958e469e2bd79319befb23328a9de38a9 (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Diffstat (limited to 'src/imports/controls/material/CheckIndicator.qml')
-rw-r--r--src/imports/controls/material/CheckIndicator.qml13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/imports/controls/material/CheckIndicator.qml b/src/imports/controls/material/CheckIndicator.qml
index c52d5ae0..67f46551 100644
--- a/src/imports/controls/material/CheckIndicator.qml
+++ b/src/imports/controls/material/CheckIndicator.qml
@@ -44,11 +44,12 @@ Rectangle {
implicitHeight: 18
color: "transparent"
border.color: !control.enabled ? control.Material.hintTextColor
- : control.checkState !== Qt.Unchecked ? control.Material.accentColor : control.Material.secondaryTextColor
- border.width: control.checkState !== Qt.Unchecked ? width / 2 : 2
+ : checkState !== Qt.Unchecked ? control.Material.accentColor : control.Material.secondaryTextColor
+ border.width: checkState !== Qt.Unchecked ? width / 2 : 2
radius: 2
property Item control
+ property int checkState: control.checkState
Behavior on border.width {
NumberAnimation {
@@ -74,7 +75,7 @@ Rectangle {
source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Material/images/check.png"
fillMode: Image.PreserveAspectFit
- scale: control.checkState === Qt.Checked ? 1 : 0
+ scale: checkState === Qt.Checked ? 1 : 0
Behavior on scale { NumberAnimation { duration: 100 } }
}
@@ -84,18 +85,18 @@ Rectangle {
width: 12
height: 3
- scale: control.checkState === Qt.PartiallyChecked ? 1 : 0
+ scale: checkState === Qt.PartiallyChecked ? 1 : 0
Behavior on scale { NumberAnimation { duration: 100 } }
}
states: [
State {
name: "checked"
- when: control.checkState === Qt.Checked
+ when: checkState === Qt.Checked
},
State {
name: "partiallychecked"
- when: control.checkState === Qt.PartiallyChecked
+ when: checkState === Qt.PartiallyChecked
}
]