aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/RadioDelegate.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/material/RadioDelegate.qml')
-rw-r--r--src/imports/controls/material/RadioDelegate.qml21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/imports/controls/material/RadioDelegate.qml b/src/imports/controls/material/RadioDelegate.qml
index 95bfb19b..d1fa5e0e 100644
--- a/src/imports/controls/material/RadioDelegate.qml
+++ b/src/imports/controls/material/RadioDelegate.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.RadioDelegate {
id: control
@@ -53,6 +54,8 @@ T.RadioDelegate {
bottomPadding: 8
spacing: 16
+ hoverEnabled: Qt.styleHints.useHoverEffects
+
indicator: RadioIndicator {
x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
@@ -75,7 +78,17 @@ T.RadioDelegate {
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
+ }
}
}