aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/Dial.qml
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@theqtcompany.com>2016-04-04 10:29:43 +0200
committerMitch Curtis <mitch.curtis@theqtcompany.com>2016-04-20 12:20:42 +0000
commitb772b5e349c48260a1c0458f841b2e6e82daf0b1 (patch)
treed4d24a6ab5bf60aa66474a3a4fd93824c2020a4d /src/imports/controls/Dial.qml
parent59e3c7f3fafb551f4636df064492226398aed1b1 (diff)
Update Default style Dial to match new design specs
Change-Id: Id3a1ce6257ab999c08130549b43414b17df6168d Task-number: QTBUG-50993 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/imports/controls/Dial.qml')
-rw-r--r--src/imports/controls/Dial.qml17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/imports/controls/Dial.qml b/src/imports/controls/Dial.qml
index 2ce2a014..a92bc112 100644
--- a/src/imports/controls/Dial.qml
+++ b/src/imports/controls/Dial.qml
@@ -35,6 +35,7 @@
****************************************************************************/
import QtQuick 2.6
+import Qt.labs.controls.impl 1.0
import Qt.labs.templates 1.0 as T
T.Dial {
@@ -44,13 +45,12 @@ T.Dial {
implicitHeight: 184
//! [background]
- background: Rectangle {
- x: control.width / 2 - width / 2
- y: control.height / 2 - height / 2
- width: Math.max(64, Math.min(control.width, control.height))
- height: width
- radius: width / 2
- border.color: "#353637"
+ background: DialRing {
+ width: control.availableWidth
+ height: control.availableHeight
+ color: control.activeFocus ? "#0066ff" : "#353637"
+ progress: control.position
+ opacity: control.enabled ? 1 : 0.3
}
//! [background]
@@ -61,8 +61,9 @@ T.Dial {
y: background.y + background.height / 2 - handle.height / 2
width: 14
height: 10
- source: "qrc:/qt-project.org/imports/Qt/labs/controls/images/dial-indicator.png"
+ source: "qrc:/qt-project.org/imports/Qt/labs/controls/images/dial-indicator" + (control.activeKeyFocus ? "-focus.png" : ".png")
antialiasing: true
+ opacity: control.enabled ? 1 : 0.3
transform: [
Translate {
y: -background.height * 0.4 + handle.height / 2