Merge lp:~martin-borho/ubuntu-weather-app/new_header_with_fixed_icons into lp:ubuntu-weather-app/obsolete.trunk

Proposed by Martin Borho
Status: Merged
Approved by: David Planella
Approved revision: 299
Merged at revision: 334
Proposed branch: lp:~martin-borho/ubuntu-weather-app/new_header_with_fixed_icons
Merge into: lp:ubuntu-weather-app/obsolete.trunk
Diff against target: 171 lines (+43/-47)
5 files modified
components/LocationTab.qml (+36/-43)
tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py (+1/-1)
tests/autopilot/ubuntu_weather_app/tests/test_mainview.py (+1/-1)
tests/autopilot/ubuntu_weather_app/tests/test_settings.py (+1/-1)
ubuntu-weather-app.qml (+4/-1)
To merge this branch: bzr merge lp:~martin-borho/ubuntu-weather-app/new_header_with_fixed_icons
Reviewer Review Type Date Requested Status
David Planella Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Nekhelesh Ramananthan (community) Needs Information
Review via email: mp+230707@code.launchpad.net

Commit message

New tab header.

Description of the change

New tab header.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

13 tools: ToolbarItems {
14 id: pageTools
15 ToolbarButton {

Now that you are transitioning to the new headers why not remove tools, ToolbarItems and transition to the new header API? One drawback is that you will drop support for trusty since the new headers require Ubuntu Components 1.1 that are only available in utopic.

review: Needs Information
299. By Martin Borho

transitioned Actions to new header api

Revision history for this message
Martin Borho (martin-borho) wrote :

Thanks for the tip, I wasn't really aware of it...

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
David Planella (dpm) wrote :

Looks good to me, thanks!

Martin, unrelated to this, but to your question a few days ago about sheets: what I'd recommend for Settings would be to use a Page, in the same way the clock reboot app does it.

review: Approve
Revision history for this message
Martin Borho (martin-borho) wrote :

Yes, I've already started replacing Sheets with Pages, but I would wait for a preview of the new design, before heading in that direction.

Revision history for this message
Martin Borho (martin-borho) wrote :
Revision history for this message
David Planella (dpm) wrote :

Nice! :-)

On Sat, Aug 16, 2014 at 8:23 PM, Martin Borho <email address hidden>
wrote:

> @david: had a second thought:
> https://code.launchpad.net/~martin-borho/ubuntu-weather-app/pagestack/+merge/231093
> :)
> --
>
> https://code.launchpad.net/~martin-borho/ubuntu-weather-app/new_header_with_fixed_icons/+merge/230707
> You are reviewing the proposed merge of
> lp:~martin-borho/ubuntu-weather-app/new_header_with_fixed_icons into
> lp:ubuntu-weather-app.
>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components/LocationTab.qml'
2--- components/LocationTab.qml 2014-04-16 13:21:04 +0000
3+++ components/LocationTab.qml 2014-08-16 10:01:36 +0000
4@@ -18,7 +18,7 @@
5 */
6 import QtQuick 2.0
7 import Ubuntu.Components.Popups 0.1
8-import Ubuntu.Components 0.1
9+import Ubuntu.Components 1.1
10 import Ubuntu.Components.ListItems 0.1 as ListItem
11 import Ubuntu.Layouts 0.1
12 import QtFeedback 5.0
13@@ -63,6 +63,7 @@
14 if(visible == true) {
15 var data = dayForecastModel.get(0)
16 adjustBackground(Math.round(data.temp))
17+ dailyForecastList.currentItem.appearAnimation.start()
18 }
19 }
20 }
21@@ -127,6 +128,40 @@
22 anchors.fill: parent
23 anchors.topMargin: units.gu(9.5)
24
25+ head.actions: [
26+ Action {
27+ id: refreshAction
28+ objectName: "RefreshButton"
29+ iconName: "reload"
30+ text: i18n.tr("Refresh")
31+
32+ onTriggered: {
33+ mainView.tabIndexAtRefresh = tabs.selectedTabIndex
34+ mainView.refreshData(false, true);
35+ }
36+ },
37+ Action {
38+ objectName: "EditButton"
39+ id: editLocationAction
40+ iconName: "add"
41+ text: i18n.tr("Edit")
42+
43+ onTriggered: {
44+ mainView.showLocationManager()
45+ }
46+ },
47+ Action {
48+ objectName: "SettingsButton"
49+ id: configAction
50+ iconName: "settings"
51+ text: i18n.tr("Settings")
52+
53+ onTriggered: {
54+ mainView.showSettings();
55+ }
56+ }
57+ ]
58+
59 ListModel {
60 id: dayForecastModel
61 }
62@@ -332,47 +367,5 @@
63 }
64 }
65 }
66-
67- tools: ToolbarItems {
68- id: pageTools
69- ToolbarButton {
70- objectName: "RefreshButton"
71- action:Action {
72- id: refreshAction
73- objectName: "RefreshAction"
74- iconName: "reload"
75- text: i18n.tr("Refresh")
76-
77- onTriggered: {
78- mainView.tabIndexAtRefresh = tabs.selectedTabIndex
79- mainView.refreshData(false, true);
80- }
81- }
82- }
83- ToolbarButton {
84- objectName: "EditButton"
85- action:Action {
86- id: editLocationAction
87- iconName: "add"
88- text: i18n.tr("Edit")
89-
90- onTriggered: {
91- mainView.showLocationManager()
92- }
93- }
94- }
95- ToolbarButton {
96- objectName: "SettingsButton"
97- action:Action {
98- id: configAction
99- iconName: "settings"
100- text: i18n.tr("Settings")
101-
102- onTriggered: {
103- mainView.showSettings();
104- }
105- }
106- }
107- }
108 }
109 }
110
111=== modified file 'tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py'
112--- tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py 2014-06-26 09:29:19 +0000
113+++ tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py 2014-08-16 10:01:36 +0000
114@@ -56,7 +56,7 @@
115 if kb:
116 self.keyboard.press_and_release('Ctrl+n')
117 else:
118- self.main_view.open_toolbar().click_button("EditButton")
119+ self.main_view.get_header().click_action_button("EditButton")
120
121 # test location manager becomes visible
122 managerSheet = self.main_view.select_single(
123
124=== modified file 'tests/autopilot/ubuntu_weather_app/tests/test_mainview.py'
125--- tests/autopilot/ubuntu_weather_app/tests/test_mainview.py 2014-06-26 09:29:19 +0000
126+++ tests/autopilot/ubuntu_weather_app/tests/test_mainview.py 2014-08-16 10:01:36 +0000
127@@ -107,7 +107,7 @@
128 if kb:
129 self.keyboard.press_and_release('Ctrl+r')
130 else:
131- self.main_view.open_toolbar().click_button("RefreshButton")
132+ self.main_view.get_header().click_action_button("RefreshButton")
133 self.main_view.wait_for_activity_to_finish()
134
135 # get the data from the refreshed tabs, have to be new
136
137=== modified file 'tests/autopilot/ubuntu_weather_app/tests/test_settings.py'
138--- tests/autopilot/ubuntu_weather_app/tests/test_settings.py 2014-06-26 09:29:19 +0000
139+++ tests/autopilot/ubuntu_weather_app/tests/test_settings.py 2014-08-16 10:01:36 +0000
140@@ -30,7 +30,7 @@
141
142 def _open_settings_sheet(self):
143 """Opens the settings sheet"""
144- self.main_view.open_toolbar().click_button("SettingsButton")
145+ self.main_view.get_header().click_action_button("SettingsButton")
146
147 def _move_pointer_around(self):
148 """
149
150=== modified file 'ubuntu-weather-app.qml'
151--- ubuntu-weather-app.qml 2014-05-16 10:36:11 +0000
152+++ ubuntu-weather-app.qml 2014-08-16 10:01:36 +0000
153@@ -35,6 +35,8 @@
154 width: units.gu(50)
155 height: units.gu(67)
156
157+ useDeprecatedToolbar: false
158+
159 headerColor: "#E04414"
160 backgroundColor: "#E04414"
161 footerColor: "#E1983E"
162@@ -225,7 +227,8 @@
163 //storage.clearSetting('units');
164
165 //Theme.palette.selected.backgroundText = "#000000";
166- Theme.palette.normal.backgroundText = "#55FFFFFF";
167+ Theme.palette.normal.backgroundText = "#55FFFF";
168+ Theme.palette.normal.background = "#ECECEC"
169
170 storage.getSettings(function(storedSettings) {
171 for(var settingName in storedSettings) {

Subscribers

People subscribed via source and target branches