Warning, /plasma/qqc2-breeze-style/style/qtquickcontrols/Slider.qml is written in an unsupported language. File is not indexed.
0001 /* SPDX-FileCopyrightText: 2020 Noah Davis <noahadvs@gmail.com> 0002 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0003 */ 0004 0005 import QtQuick 0006 import QtQuick.Templates as T 0007 import org.kde.kirigami as Kirigami 0008 import org.kde.breeze.impl as Impl 0009 0010 T.Slider { 0011 id: control 0012 0013 implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, 0014 implicitHandleWidth + leftPadding + rightPadding) 0015 implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, 0016 implicitHandleHeight + topPadding + bottomPadding) 0017 0018 Kirigami.Theme.colorSet: Kirigami.Theme.Button 0019 Kirigami.Theme.inherit: false 0020 0021 hoverEnabled: Qt.styleHints.useHoverEffects 0022 0023 padding: Kirigami.Settings.tabletMode ? Kirigami.Units.mediumSpacing : 0 0024 0025 handle: Impl.SliderHandle { 0026 control: control 0027 } 0028 0029 /* NOTE: Qt QQC2 styles use the background property for the groove 0030 * and fill. It doesn't really make sense when you look at the way 0031 * backgrounds typically work. Originally, there was a `track` property, 0032 * but it got replaced by `background` in 2016. 0033 * 0034 * Neither of the background or contentItem properties are perfect 0035 * for use as the property to hold the groove or the fill. 0036 * The background seems like it could be OK for the groove and the 0037 * contentItem could be OK for the fill. 0038 * 0039 * However, we're keeping them both in the background like Qt to avoid 0040 * any potiential compatiblity issues where app devs assume that the 0041 * contentItem will always be unused by the style. 0042 */ 0043 0044 // groove 0045 background: Impl.SliderGroove { 0046 control: control 0047 startPosition: 0 0048 endPosition: control.position 0049 } 0050 }