aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/RadioButton.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-07-09 15:59:22 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-07-11 07:18:21 +0000
commit7176d160521c4234d081863fa90320aa6527c739 (patch)
treef51054a631922a1cbacc8f5b69aa7ccc5b4d344d /src/imports/controls/material/RadioButton.qml
parente1c9b374fede4aeff405bbc3b95461ef9951b914 (diff)
Material: implement ripple effect for RadioDelegate
Task-number: QTBUG-50003 Change-Id: Ic93ef1a7993e8a0fc352f5055924a9479a7c5ff8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/material/RadioButton.qml')
-rw-r--r--src/imports/controls/material/RadioButton.qml12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/imports/controls/material/RadioButton.qml b/src/imports/controls/material/RadioButton.qml
index 284eaa2a..403b4315 100644
--- a/src/imports/controls/material/RadioButton.qml
+++ b/src/imports/controls/material/RadioButton.qml
@@ -58,6 +58,18 @@ T.RadioButton {
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
+
+ Ripple {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: 28; height: 28
+
+ z: -1
+ anchor: control
+ pressed: control.pressed
+ active: control.down || control.visualFocus || control.hovered
+ color: control.checked ? control.Material.checkBoxCheckedRippleColor : control.Material.checkBoxUncheckedRippleColor
+ }
}
contentItem: Text {