diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-07-09 16:08:03 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-07-11 07:18:24 +0000 |
commit | 3d4de58050c85e31df79d867a8cba00b1d322cc4 (patch) | |
tree | b0302dc1a6ea6adc59d19a2b81661cfcf8c0c014 /src/imports/controls/material/SwitchDelegate.qml | |
parent | 7176d160521c4234d081863fa90320aa6527c739 (diff) |
Material: implement ripple effect for SwitchDelegate
Task-number: QTBUG-50003
Change-Id: I33629bd06c125113408a7f5b11dea72821285876
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/material/SwitchDelegate.qml')
-rw-r--r-- | src/imports/controls/material/SwitchDelegate.qml | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/imports/controls/material/SwitchDelegate.qml b/src/imports/controls/material/SwitchDelegate.qml index 57a8603c..7b81524c 100644 --- a/src/imports/controls/material/SwitchDelegate.qml +++ b/src/imports/controls/material/SwitchDelegate.qml @@ -76,7 +76,17 @@ T.SwitchDelegate { background: Rectangle { implicitHeight: 48 - visible: control.down || control.highlighted - color: control.down ? control.Material.buttonPressColor : control.Material.listHighlightColor + color: control.down ? control.Material.buttonPressColor : control.highlighted ? control.Material.listHighlightColor : "transparent" + + Ripple { + width: parent.width + height: parent.height + + clip: visible + pressed: control.pressed + anchor: control + active: control.down || control.visualFocus || control.hovered + color: control.Material.checkBoxUncheckedRippleColor + } } } |