diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-07-09 15:59:22 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-07-11 07:18:21 +0000 |
commit | 7176d160521c4234d081863fa90320aa6527c739 (patch) | |
tree | f51054a631922a1cbacc8f5b69aa7ccc5b4d344d /src/imports/controls/material/RadioDelegate.qml | |
parent | e1c9b374fede4aeff405bbc3b95461ef9951b914 (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/RadioDelegate.qml')
-rw-r--r-- | src/imports/controls/material/RadioDelegate.qml | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/imports/controls/material/RadioDelegate.qml b/src/imports/controls/material/RadioDelegate.qml index 0b8ac084..918f9a37 100644 --- a/src/imports/controls/material/RadioDelegate.qml +++ b/src/imports/controls/material/RadioDelegate.qml @@ -37,6 +37,7 @@ import QtQuick 2.6 import QtQuick.Templates 2.1 as T import QtQuick.Controls.Material 2.1 +import QtQuick.Controls.Material.impl 2.1 T.RadioDelegate { id: control @@ -75,7 +76,17 @@ T.RadioDelegate { 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 + } } } |