diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-07-07 13:11:19 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-07-09 05:11:42 +0000 |
commit | 7c284809df7e8f1a2adbee1d768a07d13f0403cc (patch) | |
tree | 0ace03d4996ef2d3167f94cf36f7f5df6135b4d4 /src/imports/controls/material/SwitchIndicator.qml | |
parent | cbfa64fd84cab95d909371a5e44146928e403c05 (diff) |
Material: implement the ripple effect
Consequently, the controls that were previously using the old
Ripple type have now gained hover effects (when hoverEnabled: true).
The rest of the Material style controls will be adjusted to use the
ripple effect in follow up commits.
Task-number: QTBUG-50003
Change-Id: I436f3794411fe75de9ccbe3ecda71029130db613
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/material/SwitchIndicator.qml')
-rw-r--r-- | src/imports/controls/material/SwitchIndicator.qml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/imports/controls/material/SwitchIndicator.qml b/src/imports/controls/material/SwitchIndicator.qml index e5474356..84898270 100644 --- a/src/imports/controls/material/SwitchIndicator.qml +++ b/src/imports/controls/material/SwitchIndicator.qml @@ -43,7 +43,7 @@ Item { implicitWidth: 38 implicitHeight: 32 - property alias control: ripple.control + property Item control Material.elevation: 1 @@ -51,10 +51,10 @@ Item { id: ripple x: handle.x + handle.width / 2 - width / 2 y: handle.y + handle.height / 2 - height / 2 - width: handle.width - height: width - colored: control.checked - opacity: control.pressed || control.visualFocus ? 1 : 0 + width: 28; height: 28 + pressed: control.pressed + active: control.down || control.visualFocus || control.hovered + color: control.checked ? control.Material.checkBoxCheckedRippleColor : control.Material.checkBoxUncheckedRippleColor } Rectangle { |