ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #03851
[Merge] lp:~ahayzen/ubuntu-weather-app/reboot-fix-no-settings-button-empty-state into lp:ubuntu-weather-app/reboot
Andrew Hayzen has proposed merging lp:~ahayzen/ubuntu-weather-app/reboot-fix-no-settings-button-empty-state into lp:ubuntu-weather-app/reboot.
Commit message:
* Show settings button on empty state page
* Fix empty state page so that bottom edge animation is ontop
Requested reviews:
Ubuntu Weather Developers (ubuntu-weather-dev)
For more details, see:
https://code.launchpad.net/~ahayzen/ubuntu-weather-app/reboot-fix-no-settings-button-empty-state/+merge/266044
* Show settings button on empty state page
* Fix empty state page so that bottom edge animation is ontop
--
Your team Ubuntu Weather Developers is requested to review the proposed merge of lp:~ahayzen/ubuntu-weather-app/reboot-fix-no-settings-button-empty-state into lp:ubuntu-weather-app/reboot.
=== added file 'app/components/EmptyStateComponent.qml'
--- app/components/EmptyStateComponent.qml 1970-01-01 00:00:00 +0000
+++ app/components/EmptyStateComponent.qml 2015-07-27 21:42:07 +0000
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2015 Canonical Ltd
+ *
+ * This file is part of Ubuntu Weather App
+ *
+ * Ubuntu Weather App is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * Ubuntu Weather App is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import QtQuick 2.4
+import Ubuntu.Components 1.2
+import "../components"
+
+
+Item {
+ anchors {
+ fill: parent
+ margins: units.gu(2)
+ }
+
+ SettingsButton {
+ anchors {
+ right: parent.right
+ top: parent.top
+ }
+ }
+
+ Column {
+ anchors {
+ centerIn: parent
+ }
+ spacing: units.gu(4)
+
+ Label {
+ id: emptyStateLabel
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ }
+ text: i18n.tr("Searching for current location...")
+ }
+
+ Button {
+ id: emptyStateButton
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ }
+ objectName: "emptyStateButton"
+ text: i18n.tr("Add a manual location")
+
+ onTriggered: mainPageStack.push(Qt.resolvedUrl("../ui/AddLocationPage.qml"));
+ }
+ }
+}
=== modified file 'app/components/HeaderRow.qml'
--- app/components/HeaderRow.qml 2015-06-18 01:42:03 +0000
+++ app/components/HeaderRow.qml 2015-07-27 21:42:07 +0000
@@ -38,25 +38,7 @@
verticalAlignment: Text.AlignVCenter
}
- AbstractButton {
+ SettingsButton {
id: settingsButton
- height: width
- width: units.gu(4)
-
- onClicked: mainPageStack.push(Qt.resolvedUrl("../ui/SettingsPage.qml"))
-
- Rectangle {
- anchors.fill: parent
- color: Theme.palette.selected.background
- visible: parent.pressed
- }
-
- Icon {
- anchors.centerIn: parent
- color: UbuntuColors.darkGrey
- height: width
- name: "settings"
- width: units.gu(2.5)
- }
}
}
=== added file 'app/components/SettingsButton.qml'
--- app/components/SettingsButton.qml 1970-01-01 00:00:00 +0000
+++ app/components/SettingsButton.qml 2015-07-27 21:42:07 +0000
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2015 Canonical Ltd
+ *
+ * This file is part of Ubuntu Weather App
+ *
+ * Ubuntu Weather App is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * Ubuntu Weather App is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import QtQuick 2.4
+import Ubuntu.Components 1.2
+
+
+AbstractButton {
+ id: settingsButton
+ height: width
+ width: units.gu(4)
+
+ onClicked: mainPageStack.push(Qt.resolvedUrl("../ui/SettingsPage.qml"))
+
+ Rectangle {
+ anchors.fill: parent
+ color: Theme.palette.selected.background
+ visible: parent.pressed
+ }
+
+ Icon {
+ anchors.centerIn: parent
+ color: UbuntuColors.darkGrey
+ height: width
+ name: "settings"
+ width: units.gu(2.5)
+ }
+}
=== modified file 'app/ubuntu-weather-app.qml'
--- app/ubuntu-weather-app.qml 2015-07-27 00:57:57 +0000
+++ app/ubuntu-weather-app.qml 2015-07-27 21:42:07 +0000
@@ -172,30 +172,6 @@
}
}
- Column {
- anchors.centerIn: parent
- spacing: units.gu(4)
- visible: (locationsList == null || locationsList.length == 0) && mainPageStack.depth == 1
- z: 1000
-
- Label {
- id: emptyStateLabel
- anchors.horizontalCenter: parent.horizontalCenter
- text: i18n.tr("Searching for current location...")
- }
-
- Button {
- id: emptyStateButton
- objectName: "emptyStateButton"
-
- anchors.horizontalCenter: parent.horizontalCenter
-
- text: i18n.tr("Add a manual location")
-
- onTriggered: mainPageStack.push(Qt.resolvedUrl("ui/AddLocationPage.qml"));
- }
- }
-
Data.Storage {
id: storage
=== modified file 'app/ui/HomePage.qml'
--- app/ui/HomePage.qml 2015-07-25 21:49:25 +0000
+++ app/ui/HomePage.qml 2015-07-27 21:42:07 +0000
@@ -185,4 +185,14 @@
LoadingIndicator {
id: loadingIndicator
}
+
+ Loader {
+ active: (locationsList === null || locationsList.length === 0) && mainPageStack.depth === 1
+ anchors {
+ fill: parent
+ }
+ asynchronous: true
+ source: "../components/EmptyStateComponent.qml"
+ visible: status === Loader.Ready && active
+ }
}
=== modified file 'debian/changelog'
--- debian/changelog 2015-07-26 15:24:27 +0000
+++ debian/changelog 2015-07-27 21:42:07 +0000
@@ -12,6 +12,8 @@
* Add mocked locations for autopilot and add a test using the data
* Add setting to disable auto detecting location
* When running under autopilot do not auto detect location
+ * Show settings button on empty state page
+ * Fix empty state page so that bottom edge animation is ontop
-- Victor Thompson <victor.thompson@xxxxxxxxx> Mon, 01 Jun 2015 20:11:23 -0500
=== modified file 'po/com.ubuntu.weather.pot'
--- po/com.ubuntu.weather.pot 2015-07-27 00:57:57 +0000
+++ po/com.ubuntu.weather.pot 2015-07-27 21:42:07 +0000
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: ubuntu-weather-app\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-07-27 01:55+0100\n"
+"POT-Creation-Date: 2015-07-27 22:39+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@xxxxxx>\n"
@@ -46,6 +46,14 @@
msgid "Sunset"
msgstr ""
+#: ../app/components/EmptyStateComponent.qml:48
+msgid "Searching for current location..."
+msgstr ""
+
+#: ../app/components/EmptyStateComponent.qml:57
+msgid "Add a manual location"
+msgstr ""
+
#: ../app/components/HomeTempInfo.qml:38
msgid "Today"
msgstr ""
@@ -66,14 +74,6 @@
msgid "Cancel selection"
msgstr ""
-#: ../app/ubuntu-weather-app.qml:184
-msgid "Searching for current location..."
-msgstr ""
-
-#: ../app/ubuntu-weather-app.qml:193
-msgid "Add a manual location"
-msgstr ""
-
#: ../app/ui/AddLocationPage.qml:29
msgid "Select a city"
msgstr ""
Follow ups