Debian Codegraph @

src/app/qml/components/NetworkErrorStateComponent.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 Rectangle {
24 color: theme.palette.normal.background
25 anchors.fill: parent
26
27 SettingsButton {
28 anchors {
29 right: parent.right
30 top: parent.top
31 rightMargin: units.gu(2)
32 topMargin: units.gu(2)
33 }
34 }
35
36 Column {
37 anchors {
38 centerIn: parent
39 }
40 spacing: units.gu(4)
41 width: parent.width - units.gu(4)
42
43 Label {
44 id: networkErrorStateLabel
45 anchors {
46 horizontalCenter: parent.horizontalCenter
47 }
48 fontSize: "x-large"
49 text: i18n.tr("Network Error")
50 width: parent.width
51 wrapMode: Text.WordWrap
52 }
53
54 Label {
55 anchors {
56 horizontalCenter: parent.horizontalCenter
57 }
58 text: i18n.tr("No network connection. Could not load weather data.\nPlease check your network settings and try again.")
59 width: parent.width
60 wrapMode: Text.WordWrap
61 }
62
63 Button {
64 text: i18n.tr("OK")
65 anchors {
66 horizontalCenter: parent.horizontalCenter
67 }
68 onClicked: pop()
69 }
70 }
71 }