Warning, /plasma/qqc2-breeze-style/style/qtquickcontrols/PageIndicator.qml is written in an unsupported language. File is not indexed.
0001 /* SPDX-FileCopyrightText: 2017 The Qt Company Ltd.
0002 * SPDX-FileCopyrightText: 2020 Noah Davis <noahadvs@gmail.com>
0003 * SPDX-License-Identifier: LicenseRef-KDE-Accepted-LGPL
0004 */
0005
0006 import QtQuick
0007 import QtQuick.Templates as T
0008 import org.kde.kirigami as Kirigami
0009
0010 import org.kde.breeze.impl as Impl
0011
0012 T.PageIndicator {
0013 id: control
0014
0015 implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
0016 implicitContentWidth + leftPadding + rightPadding)
0017 implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
0018 implicitContentHeight + topPadding + bottomPadding)
0019
0020 padding: Kirigami.Units.mediumSpacing
0021 spacing: Kirigami.Units.mediumSpacing
0022
0023 // Using ShadowedRectangle because it makes smoother circles than Rectangle
0024 delegate: Kirigami.ShadowedRectangle {
0025 implicitWidth: implicitHeight
0026 implicitHeight: {
0027 let h = Impl.Units.inlineControlHeight/2
0028 h -= h % 2
0029 return h
0030 }
0031
0032 radius: height / 2
0033 color: Kirigami.Theme.textColor
0034
0035 opacity: index === currentIndex ? 1 : pressed ? 0.67 : 0.33
0036 Behavior on opacity { OpacityAnimator { duration: Kirigami.Units.shortDuration } }
0037 }
0038
0039 contentItem: Row {
0040 spacing: control.spacing
0041
0042 Repeater {
0043 model: control.count
0044 delegate: control.delegate
0045 }
0046 }
0047 }