diff options
Diffstat (limited to 'src/imports/controls/material/ItemDelegate.qml')
-rw-r--r-- | src/imports/controls/material/ItemDelegate.qml | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/imports/controls/material/ItemDelegate.qml b/src/imports/controls/material/ItemDelegate.qml index e43fc981..ec74fbee 100644 --- a/src/imports/controls/material/ItemDelegate.qml +++ b/src/imports/controls/material/ItemDelegate.qml @@ -34,9 +34,10 @@ ** ****************************************************************************/ -import QtQuick 2.6 -import QtQuick.Templates 2.0 as T -import QtQuick.Controls.Material 2.0 +import QtQuick 2.8 +import QtQuick.Templates 2.1 as T +import QtQuick.Controls.Material 2.1 +import QtQuick.Controls.Material.impl 2.1 T.ItemDelegate { id: control @@ -57,7 +58,7 @@ T.ItemDelegate { text: control.text font: control.font - color: control.enabled ? control.Material.primaryTextColor : control.Material.hintTextColor + color: control.enabled ? control.Material.foreground : control.Material.hintTextColor elide: Text.ElideRight visible: control.text horizontalAlignment: Text.AlignLeft @@ -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.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 + } } } |