Warning, /maui/nomad-style/Slider.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 * Copyright 2017 Marco Martin <mart@kde.org>
0003 * Copyright 2017 The Qt Company Ltd.
0004 *
0005 * GNU Lesser General Public License Usage
0006 * Alternatively, this file may be used under the terms of the GNU Lesser
0007 * General Public License version 3 as published by the Free Software
0008 * Foundation and appearing in the file LICENSE.LGPLv3 included in the
0009 * packaging of this file. Please review the following information to
0010 * ensure the GNU Lesser General Public License version 3 requirements
0011 * will be met: https://www.gnu.org/licenses/lgpl.html.
0012 *
0013 * GNU General Public License Usage
0014 * Alternatively, this file may be used under the terms of the GNU
0015 * General Public License version 2.0 or later as published by the Free
0016 * Software Foundation and appearing in the file LICENSE.GPL included in
0017 * the packaging of this file. Please review the following information to
0018 * ensure the GNU General Public License version 2.0 requirements will be
0019 * met: http://www.gnu.org/licenses/gpl-2.0.html.
0020 */
0021
0022
0023 import QtQuick 2.6
0024 import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
0025 import QtQuick.Templates 2.3 as T
0026 import org.kde.kirigami 2.2 as Kirigami
0027
0028 T.Slider {
0029 id: controlRoot
0030 Kirigami.Theme.colorSet: Kirigami.Theme.Button
0031
0032 implicitWidth: background.implicitWidth
0033 implicitHeight: background.implicitHeight
0034
0035 hoverEnabled: true
0036
0037 handle: Item {}
0038
0039 snapMode: T.Slider.SnapOnRelease
0040
0041 background: StylePrivate.StyleItem {
0042 control: controlRoot
0043 elementType: "slider"
0044 sunken: controlRoot.pressed
0045 implicitWidth: 200
0046 contentHeight: horizontal ? 22 : implicitWidth
0047 contentWidth: horizontal ? implicitWidth : 22
0048
0049 maximum: controlRoot.to*100
0050 minimum: controlRoot.from*100
0051 step: controlRoot.stepSize*100
0052 value: (horizontal ? controlRoot.visualPosition : 1 - controlRoot.visualPosition)*controlRoot.to*100
0053 horizontal: controlRoot.orientation === Qt.Horizontal
0054 enabled: controlRoot.enabled
0055 hasFocus: controlRoot.activeFocus
0056 hover: controlRoot.hovered
0057 activeControl: controlRoot.stepSize > 0 ? "ticks" : ""
0058 }
0059 }