Libplasma

PageIndicator.qml
1/*
2 SPDX-FileCopyrightText: 2018 Marco Martin <mart@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7import QtQuick
8import QtQuick.Layouts
9import QtQuick.Templates as T
10import org.kde.kirigami as Kirigami
11
12T.PageIndicator {
13 id: control
14
15 implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding
16 implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding
17
18 padding: Kirigami.Units.smallSpacing
19 spacing: Kirigami.Units.smallSpacing
20
21 delegate: Rectangle {
22 implicitWidth: Kirigami.Units.largeSpacing
23 implicitHeight: implicitWidth
24
25 radius: width
26 color: Kirigami.Theme.textColor
27
28 opacity: index === currentIndex ? 0.9 : pressed ? 0.7 : 0.5
29 Behavior on opacity {
30 enabled: Kirigami.Units.longDuration > 0
31 OpacityAnimator {
32 duration: Kirigami.Units.longDuration
33 easing.type: Easing.InOutQuad
34 }
35 }
36 }
37
38 contentItem: Row {
39 spacing: control.spacing
40
41 Repeater {
42 model: control.count
43 delegate: control.delegate
44 }
45 }
46}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:34:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.