Kirigami2

PrivateSwipeProgress.qml
1 /*
2  * SPDX-FileCopyrightText: 2020 Carson Black <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.0-or-later
5  */
6 
7 import QtQuick 2.12
8 import QtQuick.Layouts 1.12
9 import org.kde.kirigami 2.12 as Kirigami
10 
11 Item {
12  id: __progressRoot
13  property var progress
14 
15  Rectangle {
16  Accessible.ignored: true
17 
18  anchors {
19  top: parent.top
20  bottom: parent.bottom
21  left: parent.left
22  }
23  width: parent.width * __progressRoot.progress
24  color: Kirigami.ColorUtils.adjustColor(Kirigami.Theme.positiveTextColor, {"alpha": 0.2*255})
25 
26  Rectangle {
27  anchors {
28  bottom: Kirigami.Settings.isMobile ? undefined : parent.bottom
29  top: Kirigami.Settings.isMobile ? parent.top : undefined
30  left: parent.left
31  right: parent.right
32  }
33 
34  color: Kirigami.Theme.positiveTextColor
35 
36  // Unlike most things, we don't want to scale with the em grid, so we don't use a Unit.
37  height: 2
38  }
39  }
40 
41 
42  Rectangle {
43  Accessible.ignored: true
44 
45  anchors {
46  top: parent.top
47  bottom: parent.bottom
48  right: parent.right
49  }
50  width: parent.width - (parent.width * __progressRoot.progress)
51  color: Kirigami.ColorUtils.adjustColor(Kirigami.Theme.textColor, {"alpha": 0.1*255})
52 
53  Rectangle {
54  anchors {
55  bottom: Kirigami.Settings.isMobile ? undefined : parent.bottom
56  top: Kirigami.Settings.isMobile ? parent.top : undefined
57  left: parent.left
58  right: parent.right
59  }
60 
61  color: Kirigami.ColorUtils.adjustColor(Kirigami.Theme.textColor, {"alpha": 0.1*255})
62 
63  // Unlike most things, we don't want to scale with the em grid, so we don't use a Unit.
64  height: 2
65  }
66  }
67 }
QTextStream & right(QTextStream &stream)
QTextStream & left(QTextStream &stream)
QTextStream & left(QTextStream &s)
QTextStream & right(QTextStream &s)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jan 29 2023 04:11:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.