Changeset View
Changeset View
Standalone View
Standalone View
mobile/app/package/contents/ui/TreeDelegate.qml
Show All 12 Lines | |||||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU General Public | 14 | * You should have received a copy of the GNU General Public | ||
15 | * License along with this program; if not, write to the | 15 | * License along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | 16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.1 | 20 | import QtQuick 2.1 | ||
21 | import QtQuick.Controls 2.0 | 21 | import QtQuick.Controls 2.0 as QQC2 | ||
22 | import org.kde.kirigami 2.0 as Kirigami | 22 | import org.kde.kirigami 2.0 as Kirigami | ||
23 | 23 | | |||
24 | Column { | 24 | Column { | ||
25 | id: treeDelegate | 25 | id: treeDelegate | ||
26 | property variant sourceModel | 26 | property variant sourceModel | ||
27 | property int rowIndex: index | 27 | property int rowIndex: index | ||
28 | width: parent.width | 28 | width: parent.width | ||
29 | 29 | | |||
Show All 21 Lines | 33 | MouseArea { | |||
51 | Kirigami.Icon { | 51 | Kirigami.Icon { | ||
52 | id: icon | 52 | id: icon | ||
53 | source: decoration | 53 | source: decoration | ||
54 | width: Kirigami.Units.iconSizes.small | 54 | width: Kirigami.Units.iconSizes.small | ||
55 | height: width | 55 | height: width | ||
56 | anchors.verticalCenter: parent.verticalCenter | 56 | anchors.verticalCenter: parent.verticalCenter | ||
57 | x: Kirigami.Units.largeSpacing | 57 | x: Kirigami.Units.largeSpacing | ||
58 | } | 58 | } | ||
59 | Label { | 59 | QQC2.Label { | ||
60 | id: label | 60 | id: label | ||
61 | text: display | 61 | text: display | ||
62 | verticalAlignment: Text.AlignBottom | 62 | verticalAlignment: Text.AlignBottom | ||
63 | anchors.left: icon.right | 63 | anchors.left: icon.right | ||
64 | } | 64 | } | ||
65 | //there isn't a sane way to do a dotted line in QML | 65 | //there isn't a sane way to do a dotted line in QML | ||
66 | Rectangle { | 66 | Rectangle { | ||
67 | color: Kirigami.Theme.textColor | 67 | color: Kirigami.Theme.textColor | ||
68 | opacity: 0.3 | 68 | opacity: 0.3 | ||
69 | height: 1 | 69 | height: 1 | ||
70 | anchors { | 70 | anchors { | ||
71 | bottom: parent.bottom | 71 | bottom: parent.bottom | ||
72 | left: label.right | 72 | left: label.right | ||
73 | right: pageNumber.left | 73 | right: pageNumber.left | ||
74 | } | 74 | } | ||
75 | } | 75 | } | ||
76 | Label { | 76 | QQC2.Label { | ||
77 | id: pageNumber | 77 | id: pageNumber | ||
78 | text: pageLabel ? pageLabel : page | 78 | text: pageLabel ? pageLabel : page | ||
79 | anchors.right: parent.right | 79 | anchors.right: parent.right | ||
80 | verticalAlignment: Text.AlignBottom | 80 | verticalAlignment: Text.AlignBottom | ||
81 | anchors.rightMargin: Kirigami.Units.largeSpacing | 81 | anchors.rightMargin: Kirigami.Units.largeSpacing | ||
82 | } | 82 | } | ||
83 | } | 83 | } | ||
84 | Column { | 84 | Column { | ||
Show All 24 Lines |