Warning, /plasma/plasma-mobile/kcms/time/ui/TimePickerSpinBoxButton.qml is written in an unsupported language. File is not indexed.
0001 // Copyright 2023 Carl Schwan <carl@carlschwan.eu>
0002 // SPDX-License-Identifier: LGPL-2.0-or-later
0003
0004 import QtQuick 2.15
0005 import QtQuick.Controls 2.15 as QQC2
0006 import org.kde.kirigami 2.19 as Kirigami
0007
0008 QQC2.Button {
0009 id: root
0010 autoRepeat: true
0011
0012 required property bool isEnd
0013 required property bool isStart
0014
0015 readonly property color borderColor: if (enabled && (visualFocus || hovered || down)) {
0016 return Kirigami.Theme.focusColor
0017 } else {
0018 return Kirigami.ColorUtils.linearInterpolation(Kirigami.Theme.backgroundColor, Kirigami.Theme.textColor, 0.15)
0019 }
0020
0021 topPadding: 0
0022 bottomPadding: 0
0023
0024 contentItem: Item {
0025 implicitHeight: Kirigami.Units.gridUnit * 2
0026 Kirigami.Icon {
0027 source: root.icon.name
0028 anchors.centerIn: parent
0029 implicitHeight: Kirigami.Units.iconSizes.small
0030 implicitWidth: Kirigami.Units.iconSizes.small
0031 }
0032 }
0033
0034 background: Kirigami.ShadowedRectangle {
0035 Kirigami.Theme.colorSet: Kirigami.Theme.Button
0036 color: root.down ? Kirigami.Theme.alternateBackgroundColor : Kirigami.Theme.backgroundColor
0037
0038 corners {
0039 topLeftRadius: root.isStart ? 4 : 0
0040 topRightRadius: root.isStart ? 4 : 0
0041 bottomLeftRadius: root.isEnd ? 4 : 0
0042 bottomRightRadius: root.isEnd ? 4 : 0
0043 }
0044
0045 border {
0046 width: 1
0047 color: root.borderColor
0048 }
0049 }
0050 }