diff options
Diffstat (limited to 'src/imports/controls/material/ItemDelegate.qml')
-rw-r--r-- | src/imports/controls/material/ItemDelegate.qml | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/imports/controls/material/ItemDelegate.qml b/src/imports/controls/material/ItemDelegate.qml index e43fc981..647c3147 100644 --- a/src/imports/controls/material/ItemDelegate.qml +++ b/src/imports/controls/material/ItemDelegate.qml @@ -35,8 +35,9 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Templates 2.0 as T -import QtQuick.Controls.Material 2.0 +import QtQuick.Templates 2.1 as T +import QtQuick.Controls.Material 2.1 +import QtQuick.Controls.Material.impl 2.1 T.ItemDelegate { id: control @@ -51,6 +52,8 @@ T.ItemDelegate { padding: 16 spacing: 16 + hoverEnabled: Qt.styleHints.useHoverEffects + contentItem: Text { leftPadding: control.checkable && !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0 rightPadding: control.checkable && control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0 @@ -67,7 +70,17 @@ T.ItemDelegate { background: Rectangle { implicitHeight: 48 - visible: control.down || control.highlighted - color: control.down ? control.Material.buttonPressColor : control.Material.listHighlightColor + color: 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.rippleColor + } } } |