Debian Codegraph @

src/app/qml/components/HomePageEmptyStateComponent.qml

raw
1 /*
2 * Copyright (C) 2015 Canonical Ltd.
3 *
4 * This file is part of Lomiri Weather App
5 *
6 * Lomiri Weather App is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 3 as
8 * published by the Free Software Foundation.
9 *
10 * Lomiri Weather App is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 import QtQuick 2.12
20 import Lomiri.Components 1.3
21 import "../components"
22
23
24 Item {
25 anchors {
26 fill: parent
27 margins: units.gu(2)
28 }
29
30 SettingsButton {
31 anchors {
32 right: parent.right
33 top: parent.top
34 }
35 }
36
37 Column {
38 anchors {
39 centerIn: parent
40 }
41 spacing: units.gu(4)
42 width: parent.width - units.gu(4)
43
44 Label {
45 id: emptyStateLabel
46 anchors {
47 horizontalCenter: parent.horizontalCenter
48 }
49 horizontalAlignment: Text.AlignHCenter
50 text: settings.detectCurrentLocation
51 ? i18n.tr("Searching for current location…")
52 : i18n.tr("Cannot determine your location")
53 width: parent.width
54 wrapMode: Text.WordWrap
55 }
56
57 Label {
58 anchors {
59 horizontalCenter: parent.horizontalCenter
60 }
61 horizontalAlignment: Text.AlignHCenter
62 text: i18n.tr("Manually add a location by swiping up from the bottom of the display")
63 width: parent.width
64 wrapMode: Text.WordWrap
65 }
66 }
67 }