diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-07-09 16:01:11 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-07-11 07:18:16 +0000 |
commit | 4870918ea3a96e2e3b63c1a81fa4f159493698df (patch) | |
tree | a66b8226156e9c15d716b28d1396f52b0e6bca3b /src/imports/controls/material/ItemDelegate.qml | |
parent | be3227c4e1a3f307be989f9798ff43d22136beab (diff) |
Material: implement ripple effect for ItemDelegate
Task-number: QTBUG-50003
Change-Id: If480bffee0e6e6c2b688680365002ed58aacac5b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/material/ItemDelegate.qml')
-rw-r--r-- | src/imports/controls/material/ItemDelegate.qml | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/imports/controls/material/ItemDelegate.qml b/src/imports/controls/material/ItemDelegate.qml index 5ffb6583..a493ecbd 100644 --- a/src/imports/controls/material/ItemDelegate.qml +++ b/src/imports/controls/material/ItemDelegate.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.ItemDelegate { id: control @@ -67,7 +68,17 @@ T.ItemDelegate { 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 + } } } |