Merge lp:~nik90/unav/add-custom-back-buttons into lp:unav

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 54
Merged at revision: 54
Proposed branch: lp:~nik90/unav/add-custom-back-buttons
Merge into: lp:unav
Diff against target: 105 lines (+59/-1)
4 files modified
qml/AboutPage.qml (+12/-0)
qml/PoiListPage.qml (+13/-0)
qml/SearchPage.qml (+22/-1)
qml/Share.qml (+12/-0)
To merge this branch: bzr merge lp:~nik90/unav/add-custom-back-buttons
Reviewer Review Type Date Requested Status
costales Approve
Review via email: mp+292197@code.launchpad.net

Description of the change

Adds custom back buttons for all pages to overcome upstream SDK bug fix which is causing a critical regression in uNav where the default back buttons are hidden when page depth is 1.

To post a comment you must log in.
52. By Nekhelesh Ramananthan

merged lp:unav

53. By Nekhelesh Ramananthan

Fix positioning of search label

54. By Nekhelesh Ramananthan

Reverted the removal of hiding leading action bar in Main.qml since it appears in stable channel but not the rc-proposed channel

Revision history for this message
costales (costales) wrote :

+1! Nice touch ;)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/AboutPage.qml'
2--- qml/AboutPage.qml 2016-04-10 09:43:33 +0000
3+++ qml/AboutPage.qml 2016-04-18 21:20:29 +0000
4@@ -26,6 +26,18 @@
5 header: UNavHeader {
6 title: i18n.tr("About")
7 flickable: creditsListView
8+
9+ // #FIXME: This back button is only here to allow the user to press Escape keyboard key to go back.
10+ // This feature will be implemented upstream by the SDK devs when they add keyboard shortcuts to pages,
11+ // at which point this back button can be removed.
12+ leadingActionBar.actions: Action {
13+ iconName: "back"
14+ text: i18n.tr("Back")
15+ shortcut: "Escape"
16+ onTriggered: {
17+ mainPageStack.pop()
18+ }
19+ }
20 }
21
22 ListModel {
23
24=== modified file 'qml/PoiListPage.qml'
25--- qml/PoiListPage.qml 2016-04-17 22:32:48 +0000
26+++ qml/PoiListPage.qml 2016-04-18 21:20:29 +0000
27@@ -35,6 +35,19 @@
28 header: UNavHeader {
29 title: poiType
30 flickable: resultsListView
31+
32+ // #FIXME: This back button is only here to allow the user to press Escape keyboard key to go back.
33+ // This feature will be implemented upstream by the SDK devs when they add keyboard shortcuts to pages,
34+ // at which point this back button can be removed.
35+ leadingActionBar.actions: Action {
36+ iconName: "back"
37+ text: i18n.tr("Back")
38+ shortcut: "Escape"
39+ onTriggered: {
40+ mainPageStack.pop()
41+ }
42+ }
43+
44 trailingActionBar.actions: Action {
45 id: routeAction
46 iconSource: "../nav/img/header/poimap.svg"
47
48=== modified file 'qml/SearchPage.qml'
49--- qml/SearchPage.qml 2016-04-17 16:42:49 +0000
50+++ qml/SearchPage.qml 2016-04-18 21:20:29 +0000
51@@ -60,9 +60,30 @@
52 header: UNavHeader {
53 id: standardHeader
54
55- title: i18n.tr("Search")
56 flickable: typeSections.selectedIndex !== 2 ? mainLoader.item.flickable : null
57
58+ // #FIXME: This back button is only here to allow the user to press Escape keyboard key to go back.
59+ // This feature will be implemented upstream by the SDK devs when they add keyboard shortcuts to pages,
60+ // at which point this back button can be removed.
61+ leadingActionBar.actions: Action {
62+ iconName: "back"
63+ text: i18n.tr("Back")
64+ shortcut: "Escape"
65+ onTriggered: {
66+ mainPageStack.pop()
67+ }
68+ }
69+
70+ contents: Label {
71+ textSize: Label.Large
72+ color: "White"
73+ font.weight: Font.Light
74+ text: i18n.tr("Search")
75+ verticalAlignment: Text.AlignVCenter
76+ width: parent.width; height: units.gu(4)
77+ anchors.verticalCenter: parent.verticalCenter
78+ }
79+
80 trailingActionBar.actions: Action {
81 id: actionButton
82 iconSource: Qt.resolvedUrl("../nav/img/header/favorite-new.svg")
83
84=== modified file 'qml/Share.qml'
85--- qml/Share.qml 2016-04-15 21:08:18 +0000
86+++ qml/Share.qml 2016-04-18 21:20:29 +0000
87@@ -27,6 +27,18 @@
88
89 header: UNavHeader {
90 title: i18n.tr("Share location to")
91+
92+ // #FIXME: This back button is only here to allow the user to press Escape keyboard key to go back.
93+ // This feature will be implemented upstream by the SDK devs when they add keyboard shortcuts to pages,
94+ // at which point this back button can be removed.
95+ leadingActionBar.actions: Action {
96+ iconName: "back"
97+ text: i18n.tr("Back")
98+ shortcut: "Escape"
99+ onTriggered: {
100+ mainPageStack.pop()
101+ }
102+ }
103 }
104
105 Component {

Subscribers

People subscribed via source and target branches