diff options
Diffstat (limited to 'src/imports/controls/universal/Slider.qml')
-rw-r--r-- | src/imports/controls/universal/Slider.qml | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/imports/controls/universal/Slider.qml b/src/imports/controls/universal/Slider.qml index 66357c6e..baf91211 100644 --- a/src/imports/controls/universal/Slider.qml +++ b/src/imports/controls/universal/Slider.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,24 +35,21 @@ ****************************************************************************/ 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.Slider { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, - Math.max(track ? track.implicitWidth : 0, - handle ? handle.implicitWidth : 0) + leftPadding + rightPadding) + (handle ? handle.implicitWidth : 0) + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, - Math.max(track ? track.implicitHeight : 0, - handle ? handle.implicitHeight : 0) + topPadding + bottomPadding) + (handle ? handle.implicitHeight : 0) + topPadding + bottomPadding) padding: 6 property bool useSystemFocusVisuals: true - //! [handle] handle: Rectangle { implicitWidth: horizontal ? 8 : 24 implicitHeight: horizontal ? 24 : 8 @@ -65,10 +62,8 @@ T.Slider { radius: 4 color: control.pressed ? control.Universal.chromeHighColor : control.enabled ? control.Universal.accent : control.Universal.chromeDisabledHighColor } - //! [handle] - //! [track] - track: Item { + background: Item { implicitWidth: horizontal ? 200 : 18 implicitHeight: horizontal ? 18 : 200 @@ -99,5 +94,4 @@ T.Slider { color: control.enabled ? control.Universal.accent : control.Universal.chromeDisabledHighColor } } - //! [track] } |