aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/SliderHandle.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-07-07 13:11:19 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-07-09 05:11:42 +0000
commit7c284809df7e8f1a2adbee1d768a07d13f0403cc (patch)
tree0ace03d4996ef2d3167f94cf36f7f5df6135b4d4 /src/imports/controls/material/SliderHandle.qml
parentcbfa64fd84cab95d909371a5e44146928e403c05 (diff)
Material: implement the ripple effect
Consequently, the controls that were previously using the old Ripple type have now gained hover effects (when hoverEnabled: true). The rest of the Material style controls will be adjusted to use the ripple effect in follow up commits. Task-number: QTBUG-50003 Change-Id: I436f3794411fe75de9ccbe3ecda71029130db613 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/material/SliderHandle.qml')
-rw-r--r--src/imports/controls/material/SliderHandle.qml11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/imports/controls/material/SliderHandle.qml b/src/imports/controls/material/SliderHandle.qml
index 149c2c3f..d8f7ef4f 100644
--- a/src/imports/controls/material/SliderHandle.qml
+++ b/src/imports/controls/material/SliderHandle.qml
@@ -66,10 +66,11 @@ Item {
}
Ripple {
- width: parent.width
- height: width
- control: root.control
- colored: true
- opacity: root.handleHasFocus && !root.handlePressed ? 1 : 0
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: 22; height: 22
+ pressed: root.handlePressed
+ active: root.handlePressed || root.handleHasFocus || control.hovered
+ color: control.Material.checkBoxUncheckedRippleColor
}
}