Debian Codegraph @

qml/Components/ListItemHeader.qml

raw
1 /*
2 * This file is based on work taken from Costales' uNav app as on September 2019.
3 * Copyright (C) 2016 Nekhelesh Ramananthan https://launchpad.net/~nik9077
4 *
5 * Copyright (C) 2019 Joan Cibersheep
6 *
7 * This App is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 3 as
9 * published by the Free Software Foundation.
10 *
11 *
12 * This App is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22 import QtQuick 2.9
23 import Lomiri.Components 1.3
24
25 ListItem {
26 id: headerListItem
27
28 property string title
29 height: Math.max(units.gu(8), textLabel.height + units.gu(2))
30 width: parent.width
31
32 Label {
33 id: textLabel
34 width: parent.width - units.gu(4)
35
36 anchors {
37 bottom: parent.bottom
38 bottomMargin: units.gu(2)
39 left: parent.left
40 leftMargin: units.gu(2)
41 }
42
43 text: title
44 wrapMode: Text.WordWrap
45 font.bold: true
46 color: mainColor
47 }
48
49 divider.visible: false
50 }