aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/universal/Dial.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/universal/Dial.qml')
-rw-r--r--src/imports/controls/universal/Dial.qml14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/imports/controls/universal/Dial.qml b/src/imports/controls/universal/Dial.qml
index 9db1f8a5..6781d387 100644
--- a/src/imports/controls/universal/Dial.qml
+++ b/src/imports/controls/universal/Dial.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,8 +35,8 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.Dial {
id: control
@@ -44,20 +44,17 @@ T.Dial {
implicitWidth: 100
implicitHeight: 100
- //! [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: Math.max(64, Math.min(control.width, control.height))
+ height: width
radius: width / 2
color: "transparent"
border.color: !control.enabled ? control.Universal.baseLowColor : control.Universal.baseMediumColor
border.width: 2
}
- //! [background]
- //! [handle]
handle: Rectangle {
implicitWidth: 20
implicitHeight: 20
@@ -80,5 +77,4 @@ T.Dial {
}
]
}
- //! [handle]
}