diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-07-14 14:49:01 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-07-14 19:17:37 +0000 |
commit | 89d1f4ccea57dace9cc1a5a56e1beed298ae8ef7 (patch) | |
tree | 080a8f81bfe7fb745e8770ca3e085fcefb2978c3 /src/imports/controls/material/Dial.qml | |
parent | 2ce7e45532c0defb73220fc3e53ad9cde01636c6 (diff) |
Material: make Dial use the internal SliderHandle
Gets the same ripple/hover effect for free.
Task-number: QTBUG-54764
Change-Id: Ie741fa0c96293fde90c55b845d8ce5cccce3481f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/material/Dial.qml')
-rw-r--r-- | src/imports/controls/material/Dial.qml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/imports/controls/material/Dial.qml b/src/imports/controls/material/Dial.qml index 5ae1e281..38f2ebcb 100644 --- a/src/imports/controls/material/Dial.qml +++ b/src/imports/controls/material/Dial.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.Dial { id: control @@ -55,7 +56,7 @@ T.Dial { border.color: control.enabled ? control.Material.accentColor : control.Material.hintTextColor } - handle: Rectangle { + handle: SliderHandle { id: handleItem x: background.x + background.width / 2 - handle.width / 2 @@ -72,7 +73,10 @@ T.Dial { ] implicitWidth: 14 implicitHeight: 14 - radius: width / 2 - color: control.enabled ? control.Material.accentColor : control.Material.hintTextColor + + value: control.value + handleHasFocus: control.visualFocus + handlePressed: control.pressed + handleHovered: control.hovered } } |