Merge lp:~nik90/unav/revamp-popup-and-zoom-button into lp:unav
- revamp-popup-and-zoom-button
- Merge into trunk
Status: | Merged | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 44 | ||||||||||||||||
Proposed branch: | lp:~nik90/unav/revamp-popup-and-zoom-button | ||||||||||||||||
Merge into: | lp:unav | ||||||||||||||||
Diff against target: |
651 lines (+256/-156) 9 files modified
nav/class/UI.js (+4/-4) nav/css/unav.css (+4/-4) qml/FavoritesPage.qml (+10/-0) qml/Main.qml (+95/-127) qml/PoiListPage.qml (+0/-19) qml/components/ActionIcon.qml (+1/-1) qml/components/GridIconDelegate.qml (+2/-1) qml/components/PoiPopup.qml (+59/-0) qml/components/ZoomButtons.qml (+81/-0) |
||||||||||||||||
To merge this branch: | bzr merge lp:~nik90/unav/revamp-popup-and-zoom-button | ||||||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
JkB | Approve | ||
costales | Approve | ||
Review via email: mp+291615@code.launchpad.net |
Commit message
Description of the change
This MP implements the following,
- Revamps the pop up design to be more modern and inline with our app design
- Revamps the zoom buttons
- Adds subtle slide in animations for the zoom buttons and popup
- Adds subtitle list item delete transition
- Removed the purple color used in the bottom panel (marcos patch)
- 50. By Nekhelesh Ramananthan
-
Shave of listitem trailing actions in poi list page
- 51. By Nekhelesh Ramananthan
-
Hide phone button if phone number is not available
- 52. By Nekhelesh Ramananthan
-
Renamed POIPopup.qml to PoiPopup.qml to maintain consistency
- 53. By Nekhelesh Ramananthan
-
Dynamically load/unload the poi popup contents to save memory and improve performance
- 54. By Nekhelesh Ramananthan
-
Added delete listitem animation in favorites page
- 55. By Nekhelesh Ramananthan
-
Fixed fullscreen animation
- 56. By Nekhelesh Ramananthan
-
Fixed tiny bug where popup shows when it shoudlnt
- 57. By Nekhelesh Ramananthan
-
Fixed marker clashing with popup (marcos patch)
- 58. By Nekhelesh Ramananthan
-
Changed bottom navigation panel to jet black
- 59. By Nekhelesh Ramananthan
-
Fixed popup not hiding properly in desktop
JkB (joergberroth) wrote : | # |
On the phone:
*start app in fullscreen mode
* a white bar in the top is shown.
* goes away after the first transition of the pop up.
Else great. i will bring in reverse search on that base. and hand over for the design to you.
I will branch against yours, so do not merge before.
JkB (joergberroth) wrote : | # |
The font size does not fit to the panel. One of both has to be adjusted....
---
maybe a bit more opacity to the zoom Buttons. This is up to you.
JkB (joergberroth) wrote : | # |
move ZoomButtons.qml and poiPopUp.qml to components ?!
- 60. By Nekhelesh Ramananthan
-
Fixed all instances of purple color
Nekhelesh Ramananthan (nik90) wrote : | # |
> On the phone:
> *start app in fullscreen mode
> * a white bar in the top is shown.
> * goes away after the first transition of the pop up.
>
Hmm I tried but I couldn't reproduce this bug. Do you have the recent fixes I did? @Marcos, can you confirm this issue?
> Else great. i will bring in reverse search on that base. and hand over for the
> design to you.
> I will branch against yours, so do not merge before.
Sure, I will wait for your branch.
Nekhelesh Ramananthan (nik90) wrote : | # |
> The font size does not fit to the panel. One of both has to be adjusted....
>
Hmm I don't understand this issue. Can you explain more? Or share a screenshot where the font size does not fit the panel?
- 61. By Nekhelesh Ramananthan
-
Moved zoom buttons and poi popup to components folder
costales (costales) wrote : | # |
@Nekhelesh: How do you see this? For the zoom box, a not dark (and transparent) background.
I can't see the zoom icons with the white background: http://
Thanks!!
costales (costales) wrote : | # |
@Joerg: I think you tried the branch in the first commit. Could you try again? I didn't understand so well the issue too :)
costales (costales) wrote : | # |
Perfect for me now :)
JkB (joergberroth) wrote : | # |
Hey Nik,
the bar is gone. Another rev conflict on my side, the last one did the
trick.
Great work again! As I said it would be great to have reverseGeoCoding,
too. See my changes in main.qml as a concept:
http://
Try it and implement it! it's great. I had not much time right now.
There might be some minor tweaks to do.
It should also be possible to separate waypoints from pois. I have not
worked on that, but if you get this out of the query-result, then you
could implement a info button for those cases where a poi is clicked!
Thanks a lot.
Best Joerg
Am 2016-04-12 um 21:07 schrieb Nekhelesh Ramananthan:
> The proposal to merge lp:~nik90/unav/revamp-popup-and-zoom-button into lp:unav has been updated.
>
> Description changed to:
>
> This MP implements the following,
> - Revamps the pop up design to be more modern and inline with our app design
> - Revamps the zoom buttons
> - Adds subtle slide in animations for the zoom buttons and popup
> - Adds subtitle list item delete transition
> - Removed the purple color used in the bottom panel (marcos patch)
>
> http://
>
> For more details, see:
> https:/
>
Nekhelesh Ramananthan (nik90) wrote : | # |
> Hey Nik,
>
> the bar is gone. Another rev conflict on my side, the last one did the
> trick.
Glad to know. Thanks for confirming that.
> Great work again! As I said it would be great to have reverseGeoCoding,
> too. See my changes in main.qml as a concept:
>
> http://
>
> Try it and implement it! it's great. I had not much time right now.
> There might be some minor tweaks to do.
Looking at your code and the url, I finally understand what feature you want implemented. So basically the user can press on any point in the map, and if that point turns out to be a POI (found by the process of reverseGeoCoding), we then show the POI Popup instead of the generic coordinates popup.
I think that's great! Nice idea!
>
> It should also be possible to separate waypoints from pois. I have not
> worked on that, but if you get this out of the query-result, then you
> could implement a info button for those cases where a poi is clicked!
I do not fully understand by what you mean by waypoints from pois. Can you explain that a bit more pls?
Here's how I am going to proceed with this feature implementation,
1. I am going to merge this branch since it fixes quite a few bugs and I don't want it to wait while we implement yet another feature. So please approve this branch if you think it is otherwise ready except for the reverseGeoCoding feature.
2. I will create a new branch (first thing tomorrow) and merge your changes and continue to work on the reverseGeoCoding feature. Frankly it will require minimal UI changes and should be easy enough to implement.
Meanwhile please do also explain the waypoints from pois feature. Thnx
Cheers
nik90
JkB (joergberroth) : | # |
JkB (joergberroth) wrote : | # |
Am Mittwoch, 13. April 2016 00:31:32 CEST schrieb Nekhelesh Ramananthan
<email address hidden>:
>> Hey Nik,
>>
>> the bar is gone. Another rev conflict on my side, the last one did the
>> trick.
>
> Glad to know. Thanks for confirming that.
>
>> Great work again! As I said it would be great to have reverseGeoCoding,
>> too. See my changes in main.qml as a concept:
>>
>> http://
>>
>> Try it and implement it! it's great. I had not much time right now.
>> There might be some minor tweaks to do.
>
> Looking at your code and the url, I finally understand what
> feature you want implemented. So basically the user can press on
> any point in the map, and if that point turns out to be a POI
> (found by the process of reverseGeoCoding), we then show the POI
> Popup instead of the generic coordinates popup.
>
> I think that's great! Nice idea!
>
>>
>> It should also be possible to separate waypoints from pois. I have not
>> worked on that, but if you get this out of the query-result, then you
>> could implement a info button for those cases where a poi is clicked!
>
> I do not fully understand by what you mean by waypoints from
> pois. Can you explain that a bit more pls?
>
You will see it quite soon.
This featur is made to reverse any coord to an address (way). If you click
on a building that is marked as a poi it returns the poi. If we identiy
this we can diff the behaviour. Find out.
> Here's how I am going to proceed with this feature implementation,
>
> 1. I am going to merge this branch since it fixes quite a few
> bugs and I don't want it to wait while we implement yet another
> feature. So please approve this branch if you think it is
> otherwise ready except for the reverseGeoCoding feature.
>
> 2. I will create a new branch (first thing tomorrow) and merge
> your changes and continue to work on the reverseGeoCoding
> feature. Frankly it will require minimal UI changes and should
> be easy enough to implement.
>
> Meanwhile please do also explain the waypoints from pois feature. Thnx
>
> Cheers
> nik90
--
Versandt, mit Dekko von meinem Ubuntu-Gerät
Preview Diff
1 | === modified file 'nav/class/UI.js' |
2 | --- nav/class/UI.js 2016-04-10 16:36:44 +0000 |
3 | +++ nav/class/UI.js 2016-04-12 18:47:34 +0000 |
4 | @@ -195,7 +195,7 @@ |
5 | if ($('#panel_msg').is(':visible')) |
6 | aux_height = aux_height + $('#panel_msg').height(); |
7 | aux_height = aux_height + 55; |
8 | - this.map.getView().fit(this.routeSource.getExtent(), this.map.getSize(), {padding: [80, 25, aux_height, 25]}); |
9 | + this.map.getView().fit(this.routeSource.getExtent(), this.map.getSize(), {padding: [150, 25, aux_height, 25]}); |
10 | } |
11 | } |
12 | |
13 | @@ -368,7 +368,7 @@ |
14 | if ($('#panel_msg').is(':visible')) |
15 | aux_height = aux_height + $('#panel_msg').height(); |
16 | aux_height = aux_height + 50; |
17 | - this.map.getView().fit(this.map_pois_extend.getExtent(), this.map.getSize(), {padding: [80, 15, aux_height, 15]}); |
18 | + this.map.getView().fit(this.map_pois_extend.getExtent(), this.map.getSize(), {padding: [150, 15, aux_height, 15]}); |
19 | } |
20 | } |
21 | |
22 | @@ -429,7 +429,7 @@ |
23 | if (route_indicator['speaked']) |
24 | $('#panel_indication').css('background-color', this.COLOR_ORANGE); |
25 | else |
26 | - $('#panel_indication, #panel_txt_ind').css('background-color', this.COLOR_PURPLE); |
27 | + $('#panel_indication, #panel_txt_ind').css('background-color', this.COLOR_BLACK); |
28 | |
29 | // Radar |
30 | if (route_indicator['radar']) { |
31 | @@ -473,7 +473,7 @@ |
32 | $('#p_next_dist').html(''); |
33 | $('#p_txt_ind').html(t("Click onto the icon for reviewing the route")); |
34 | $('#panel_navigation').show(); |
35 | - $('#panel_indication, #panel_txt_ind').css('background-color', this.COLOR_PURPLE); |
36 | + $('#panel_indication, #panel_txt_ind').css('background-color', this.COLOR_BLACK); |
37 | break; |
38 | } |
39 | } |
40 | |
41 | === modified file 'nav/css/unav.css' |
42 | --- nav/css/unav.css 2016-03-26 18:53:17 +0000 |
43 | +++ nav/css/unav.css 2016-04-12 18:47:34 +0000 |
44 | @@ -17,7 +17,7 @@ |
45 | left: 50%; |
46 | margin-left: -50%; |
47 | height:25px; |
48 | - background:#2C001E; |
49 | + background:#292929; |
50 | color:white; |
51 | z-index: 2; |
52 | vertical-align:middle; |
53 | @@ -38,7 +38,7 @@ |
54 | margin-left: -50%; |
55 | height:25px; |
56 | background:#f7f7f7; |
57 | - color: #2C001E; |
58 | + color: #292929; |
59 | font-weight: normal; |
60 | z-index: 2; |
61 | vertical-align:middle; |
62 | @@ -50,7 +50,7 @@ |
63 | width:80px; |
64 | right: -11px; |
65 | height:50px; |
66 | - background:#2C001E; |
67 | + background:#292929; |
68 | z-index: 2; |
69 | vertical-align:middle; |
70 | text-align:center; |
71 | @@ -68,7 +68,7 @@ |
72 | left: 0; |
73 | margin: 0 78px 0 0; |
74 | height:50px; |
75 | - background:#2C001E; |
76 | + background:#292929; |
77 | z-index: 2; |
78 | font-size:18px; |
79 | color:#ffffff; |
80 | |
81 | === modified file 'qml/FavoritesPage.qml' |
82 | --- qml/FavoritesPage.qml 2016-04-10 15:45:29 +0000 |
83 | +++ qml/FavoritesPage.qml 2016-04-12 18:47:34 +0000 |
84 | @@ -41,6 +41,7 @@ |
85 | anchors.fill: parent |
86 | |
87 | function addPOIFromPopup() { |
88 | + // if name is valid/provided, then proceed to check for name conflicts and then add the favorite |
89 | if (favoritesPage.favName) { |
90 | var exist_fav = UnavDB.getFavorite(favoritesPage.favName); |
91 | if (exist_fav[0] === null || exist_fav[1] === null) { |
92 | @@ -52,6 +53,11 @@ |
93 | PopupUtils.open(addFavorite, favoritesPage, {"isOverwriteMode": true}) |
94 | } |
95 | } |
96 | + |
97 | + // If no name is provided, show the add favorite dialog |
98 | + else { |
99 | + PopupUtils.open(addFavorite, favoritesPage) |
100 | + } |
101 | } |
102 | |
103 | header: UNavHeader { |
104 | @@ -111,6 +117,10 @@ |
105 | anchors.fill: parent |
106 | interactive: contentHeight > height |
107 | |
108 | + displaced: Transition { |
109 | + UbuntuNumberAnimation { property: "y"; duration: UbuntuAnimation.BriskDuration } |
110 | + } |
111 | + |
112 | delegate: ListItem { |
113 | id: delegate |
114 | |
115 | |
116 | === modified file 'qml/Main.qml' |
117 | --- qml/Main.qml 2016-04-11 17:54:40 +0000 |
118 | +++ qml/Main.qml 2016-04-12 18:47:34 +0000 |
119 | @@ -148,6 +148,9 @@ |
120 | enabled: navigationPage.buttonsEnabled |
121 | onTriggered: { |
122 | navApp.settings.headerVisible = !navApp.settings.headerVisible; |
123 | + if (goThereActionPopover.isShown) { |
124 | + goThereActionPopover.show(); |
125 | + } |
126 | } |
127 | }, |
128 | |
129 | @@ -386,7 +389,6 @@ |
130 | } |
131 | |
132 | ActionIcon { |
133 | - icon.color: "#5D5D5D" |
134 | icon.source: mainPageStack.center_onpos ? (mainPageStack.center_onpos === 1 ? "../nav/img/header/transparent_center_onpos.svg" : "../nav/img/header/transparent_center_onpos_light.svg") : "../nav/img/header/transparent_gps_off.svg" |
135 | enabled: navigationPage.buttonsEnabled && mainPageStack.center_onpos !== 2 |
136 | onClicked: { |
137 | @@ -410,37 +412,22 @@ |
138 | } |
139 | } |
140 | |
141 | - Column { |
142 | - id: zoomSplashColumn |
143 | - |
144 | - anchors { |
145 | - right: parent.right |
146 | - rightMargin: units.gu(1) |
147 | - verticalCenter: parent.verticalCenter |
148 | - verticalCenterOffset: units.gu(-3) |
149 | - } |
150 | - |
151 | + ZoomButtons { |
152 | + id: zoomButtons |
153 | visible: navigationPage.buttonsEnabled |
154 | - |
155 | - ActionIcon { |
156 | - icon.name: "zoom-in" |
157 | - icon.width: units.gu(4) |
158 | - onClicked: mainPageStack.executeJavaScript("custom_zoom(1)") |
159 | - } |
160 | - |
161 | - ActionIcon { |
162 | - icon.name: "zoom-out" |
163 | - icon.width: units.gu(4) |
164 | - onClicked: mainPageStack.executeJavaScript("custom_zoom(-1)") |
165 | - } |
166 | + onZoomedIn: mainPageStack.executeJavaScript("custom_zoom(1)") |
167 | + onZoomedOut: mainPageStack.executeJavaScript("custom_zoom(-1)") |
168 | } |
169 | |
170 | - ActionSelectionPopover { |
171 | + PoiPopup { |
172 | id: goThereActionPopover |
173 | |
174 | - // #FIXME: Find out how to replace these hardcoded width and height and use the delegate's dimension automatically |
175 | - width: goThereActionPopover.poiName !== i18n.tr("Current Position") && goThereActionPopover.osm_id !== 'none' ? units.gu(46.5) : units.gu(38.5) |
176 | - height: mainPageStack.favPopup ? units.gu(21) : units.gu(16) |
177 | + // Dragons be here! Don't change these values |
178 | + hidePosition: -3*height |
179 | + showPosition: navApp.settings.headerVisible ? 0 : -navigationPage.header.height |
180 | + anchors { top: navigationPage.header.bottom; topMargin: hidePosition } |
181 | + |
182 | + height: mainContentLoader.height + 2*mainContentLoader.anchors.margins |
183 | |
184 | property string poiName |
185 | property string osm_type |
186 | @@ -448,75 +435,34 @@ |
187 | property string website |
188 | property string phone |
189 | |
190 | - anchors { |
191 | - top: parent.top |
192 | - left: parent.left |
193 | - topMargin: units.gu(5) |
194 | - leftMargin: units.gu(-1) |
195 | + Loader { |
196 | + id: mainContentLoader |
197 | + sourceComponent: goThereActionPopover.isShown ? (goThereActionPopover.osm_id === 'none' ? genericPopupComponent : poiPopupComponent) : undefined |
198 | + anchors { top: parent.top; left: parent.left; right: parent.right; margins: units.gu(2) } |
199 | } |
200 | |
201 | - delegate: Item { |
202 | - id: popoverDelegate |
203 | - |
204 | - width: goThereColumn.width + units.gu(2) |
205 | - height: goThereColumn.height + units.gu(2) |
206 | - |
207 | + Component { |
208 | + id: genericPopupComponent |
209 | Column { |
210 | - id: goThereColumn |
211 | - |
212 | - spacing: units.gu(1) |
213 | - width: buttonRow.width |
214 | - anchors { top: parent.top; left: parent.left; margins: units.gu(1) } |
215 | - |
216 | - RowLayout { |
217 | - anchors { left: parent.left; right: parent.right } |
218 | - visible: goThereActionPopover.poiName |
219 | - |
220 | - Label { |
221 | - id: poiLabel |
222 | - text: goThereActionPopover.poiName |
223 | - visible: goThereActionPopover.poiName !== "" |
224 | - Layout.fillWidth: true |
225 | - maximumLineCount: 2 |
226 | - textSize: Label.Small |
227 | - elide: Text.ElideRight |
228 | - wrapMode: Text.WordWrap |
229 | - } |
230 | - |
231 | - ActionIcon { |
232 | - id: websiteButton |
233 | - width: units.gu(2) |
234 | - visible: goThereActionPopover.website !== "" && goThereActionPopover.website.substring(0, 4) === "http" |
235 | - icon.name: "external-link" |
236 | - onClicked: Qt.openUrlExternally(goThereActionPopover.website) |
237 | - } |
238 | - |
239 | - ActionIcon { |
240 | - id: callButton |
241 | - width: units.gu(2) |
242 | - visible: goThereActionPopover.phone !== "" |
243 | - icon.name: "call-start" |
244 | - onClicked: Qt.openUrlExternally("tel:///" + goThereActionPopover.phone) |
245 | - } |
246 | - } |
247 | + spacing: units.gu(2) |
248 | |
249 | Label { |
250 | - text: i18n.tr("Coord:") + " " + parseFloat(mainPageStack.clickedLat).toFixed(5) + ", " + parseFloat(mainPageStack.clickedLng).toFixed(5) |
251 | - textSize: Label.Small |
252 | + textSize: Label.Large |
253 | width: parent.width |
254 | visible: !goThereActionPopover.poiName |
255 | + horizontalAlignment: Text.AlignHCenter |
256 | + text: i18n.tr("Coord: %1, %2").arg(parseFloat(mainPageStack.clickedLat).toFixed(5)).arg(parseFloat(mainPageStack.clickedLng).toFixed(5)) |
257 | + color: UbuntuColors.slate |
258 | } |
259 | |
260 | Row { |
261 | - id: buttonRow |
262 | - |
263 | spacing: units.gu(0.5) |
264 | - anchors { left: parent.left } |
265 | + anchors.horizontalCenter: parent.horizontalCenter |
266 | |
267 | - IconButton { |
268 | - id: goThereButton |
269 | + GridIconDelegate { |
270 | icon.name: "send" |
271 | - color: UbuntuColors.green |
272 | + icon.height: units.gu(3) |
273 | + highlightSize: units.gu(-1) |
274 | visible: goThereActionPopover.poiName !== i18n.tr("Current Position") ? true : false |
275 | onClicked: { |
276 | goThereActionPopover.hide(); |
277 | @@ -526,42 +472,39 @@ |
278 | } |
279 | } |
280 | |
281 | - IconButton { |
282 | - id: addFavButton |
283 | + GridIconDelegate { |
284 | icon.name: mainPageStack.favPopup ? "starred" : "non-starred" |
285 | - color: UbuntuColors.coolGrey |
286 | + icon.height: units.gu(3) |
287 | + highlightSize: units.gu(-1) |
288 | onClicked: { |
289 | mainPageStack.favPopup = !mainPageStack.favPopup; |
290 | - favNamePopup.text = ''; |
291 | - if (mainPageStack.favPopup) { |
292 | - favNamePopup.forceActiveFocus(); |
293 | - } |
294 | + mainPageStack.push(Qt.resolvedUrl("FavoritesPage.qml"), {isAddedFromPopup: true, lat: mainPageStack.clickedLat, lng: mainPageStack.clickedLng, favName: ""}); |
295 | } |
296 | } |
297 | |
298 | - IconButton { |
299 | - id: poiButton |
300 | + GridIconDelegate { |
301 | icon.name: "location" |
302 | - color: UbuntuColors.orange |
303 | + icon.height: units.gu(3) |
304 | + highlightSize: units.gu(-1) |
305 | onClicked: { |
306 | mainPageStack.push(Qt.resolvedUrl("./PoiPage.qml"), {"fromPage": "Main.qml", "lat": mainPageStack.clickedLat, "lng": mainPageStack.clickedLng}) |
307 | } |
308 | } |
309 | |
310 | - IconButton { |
311 | - id: shareButton |
312 | + GridIconDelegate { |
313 | icon.name: "share" |
314 | - color: UbuntuColors.lightAubergine |
315 | + icon.height: units.gu(3) |
316 | + highlightSize: units.gu(-1) |
317 | onClicked: { |
318 | mainPageStack.push(Qt.resolvedUrl("Share.qml"), {"lat": mainPageStack.clickedLat, "lon": mainPageStack.clickedLng}) |
319 | } |
320 | } |
321 | |
322 | - IconButton { |
323 | - id: ptFromButton |
324 | + GridIconDelegate { |
325 | icon.name: "transfer-progress-upload" |
326 | visible: mainPageStack.ptFromLat === "null" |
327 | - color: UbuntuColors.darkGrey |
328 | + icon.height: units.gu(3) |
329 | + highlightSize: units.gu(-1) |
330 | onClicked: { |
331 | goThereActionPopover.hide(); |
332 | mainPageStack.ptFromLat = mainPageStack.clickedLat; |
333 | @@ -569,11 +512,11 @@ |
334 | } |
335 | } |
336 | |
337 | - IconButton { |
338 | - id: ptToButton |
339 | + GridIconDelegate { |
340 | icon.name: "transfer-progress-download" |
341 | visible: mainPageStack.ptFromLat !== "null" |
342 | - color: UbuntuColors.darkGrey |
343 | + icon.height: units.gu(3) |
344 | + highlightSize: units.gu(-1) |
345 | onClicked: { |
346 | goThereActionPopover.hide(); |
347 | mainPageStack.routeState = 'simulate_calculating'; |
348 | @@ -581,40 +524,65 @@ |
349 | mainPageStack.ptFromLat = "null"; |
350 | } |
351 | } |
352 | - |
353 | - IconButton { |
354 | - id: infoButton |
355 | + } |
356 | + } |
357 | + } |
358 | + |
359 | + Component { |
360 | + id: poiPopupComponent |
361 | + Column { |
362 | + spacing: units.gu(2) |
363 | + |
364 | + Label { |
365 | + text: goThereActionPopover.poiName |
366 | + visible: goThereActionPopover.poiName !== "" |
367 | + maximumLineCount: 2 |
368 | + width: parent.width |
369 | + horizontalAlignment: Text.AlignHCenter |
370 | + textSize: Label.Large |
371 | + elide: Text.ElideRight |
372 | + wrapMode: Text.WordWrap |
373 | + color: UbuntuColors.slate |
374 | + } |
375 | + |
376 | + Row { |
377 | + spacing: units.gu(2) |
378 | + anchors.horizontalCenter: parent.horizontalCenter |
379 | + |
380 | + GridIconDelegate { |
381 | + icon.name: "send" |
382 | + icon.height: units.gu(3) |
383 | + highlightSize: units.gu(-1) |
384 | + onClicked: { |
385 | + goThereActionPopover.hide(); |
386 | + mainPageStack.center_onpos = 2; |
387 | + mainPageStack.routeState = 'yes'; |
388 | + mainPageStack.executeJavaScript("calc2coord(" + mainPageStack.clickedLat + ", " + mainPageStack.clickedLng + ");"); |
389 | + } |
390 | + } |
391 | + |
392 | + GridIconDelegate { |
393 | + icon.name: "call-start" |
394 | + icon.height: units.gu(3) |
395 | + highlightSize: units.gu(-1) |
396 | + visible: goThereActionPopover.phone !== "" |
397 | + onClicked: { |
398 | + Qt.openUrlExternally("tel:///" + goThereActionPopover.phone) |
399 | + } |
400 | + } |
401 | + |
402 | + GridIconDelegate { |
403 | icon.name: "info" |
404 | - visible: goThereActionPopover.osm_id !== 'none' |
405 | - color: UbuntuColors.orange |
406 | + icon.height: units.gu(3) |
407 | + highlightSize: units.gu(-1) |
408 | onClicked: { |
409 | goThereActionPopover.hide(); |
410 | mainPageStack.push(Qt.resolvedUrl("PoiDetailsPage.qml"), {osm_id: goThereActionPopover.osm_id, osm_type: goThereActionPopover.osm_type, poiName: goThereActionPopover.poiName}) |
411 | } |
412 | } |
413 | - |
414 | - } |
415 | - |
416 | - TextField { |
417 | - id: favNamePopup |
418 | - width: parent.width |
419 | - height: units.gu(4) |
420 | - visible: mainPageStack.favPopup |
421 | - inputMethodHints: Qt.ImhNoPredictiveText |
422 | - placeholderText: i18n.tr("Favorite name") |
423 | - onTriggered: { |
424 | - if (text.length > 0) { |
425 | - goThereActionPopover.hide(); |
426 | - mainPageStack.push(Qt.resolvedUrl("FavoritesPage.qml"), {isAddedFromPopup: true, lat: mainPageStack.clickedLat, lng: mainPageStack.clickedLng, favName: favNamePopup.text}); |
427 | - } |
428 | - } |
429 | } |
430 | } |
431 | } |
432 | - |
433 | - actions: ActionList { |
434 | - Action {} |
435 | - } |
436 | } |
437 | } |
438 | } |
439 | |
440 | === modified file 'qml/PoiListPage.qml' |
441 | --- qml/PoiListPage.qml 2016-04-11 20:00:06 +0000 |
442 | +++ qml/PoiListPage.qml 2016-04-12 18:47:34 +0000 |
443 | @@ -270,25 +270,6 @@ |
444 | } |
445 | }, |
446 | Action { |
447 | - iconName: "non-starred" |
448 | - onTriggered: { |
449 | - mainPageStack.push(Qt.resolvedUrl("FavoritesPage.qml"), {isAddedFromPopup: true, lat: model.lat, lng: model.lng, favName: model.name}) |
450 | - } |
451 | - }, |
452 | - Action { |
453 | - iconName: "share" |
454 | - onTriggered: { |
455 | - mainPageStack.push(Qt.resolvedUrl("Share.qml"), {"lat": model.lat, "lon": model.lng}) |
456 | - } |
457 | - }, |
458 | - Action { |
459 | - iconName: "external-link" |
460 | - visible: (model.website !== "" && model.website.substring(0, 4) === "http") |
461 | - onTriggered: { |
462 | - Qt.openUrlExternally(website) |
463 | - } |
464 | - }, |
465 | - Action { |
466 | iconName: "call-start" |
467 | visible: model.phone !== "" |
468 | onTriggered: { |
469 | |
470 | === modified file 'qml/components/ActionIcon.qml' |
471 | --- qml/components/ActionIcon.qml 2016-03-26 18:53:17 +0000 |
472 | +++ qml/components/ActionIcon.qml 2016-04-12 18:47:34 +0000 |
473 | @@ -31,7 +31,7 @@ |
474 | width: units.gu(2) |
475 | height: width |
476 | anchors.centerIn: parent |
477 | - color: "#5D5D5D" // #TODO: Replace with UbuntuColors.slate after OTA-10 release |
478 | + color: UbuntuColors.slate |
479 | } |
480 | } |
481 | |
482 | |
483 | === modified file 'qml/components/GridIconDelegate.qml' |
484 | --- qml/components/GridIconDelegate.qml 2016-04-11 17:40:45 +0000 |
485 | +++ qml/components/GridIconDelegate.qml 2016-04-12 18:47:34 +0000 |
486 | @@ -21,13 +21,14 @@ |
487 | |
488 | // Public APIs |
489 | property alias icon: _icon |
490 | + property int highlightSize: units.gu(-2) |
491 | |
492 | width: units.gu(7) |
493 | height: _icon.height |
494 | |
495 | Loader { |
496 | sourceComponent: gridDelegate.pressed ? backgroundComponent : undefined |
497 | - anchors { fill: _icon; margins: -units.gu(2) } |
498 | + anchors { fill: _icon; margins: highlightSize } |
499 | } |
500 | |
501 | Component { |
502 | |
503 | === added file 'qml/components/PoiPopup.qml' |
504 | --- qml/components/PoiPopup.qml 1970-01-01 00:00:00 +0000 |
505 | +++ qml/components/PoiPopup.qml 2016-04-12 18:47:34 +0000 |
506 | @@ -0,0 +1,59 @@ |
507 | +/* |
508 | + * GPS Navigation http://launchpad.net/unav |
509 | + * Copyright (C) 2016 Nekhelesh Ramananthan https://launchpad.net/~nik90 |
510 | + * |
511 | + * GPS Navigation is free software; you can redistribute it and/or modify |
512 | + * it under the terms of the GNU General Public License as published by |
513 | + * the Free Software Foundation; either version 3 of the License, or |
514 | + * (at your option) any later version. |
515 | + * |
516 | + * GPS Navigation is distributed in the hope that it will be useful, |
517 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
518 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
519 | + * GNU General Public License for more details. |
520 | + */ |
521 | + |
522 | +import QtQuick 2.4 |
523 | +import Ubuntu.Components 1.3 |
524 | + |
525 | +Rectangle { |
526 | + id: popup |
527 | + |
528 | + color: "White" |
529 | + width: parent.width |
530 | + |
531 | + property int showPosition |
532 | + property int hidePosition |
533 | + |
534 | + property bool isShown: false |
535 | + |
536 | + function show() { |
537 | + isShown = true |
538 | + entranceAnimation.start() |
539 | + } |
540 | + |
541 | + function hide() { |
542 | + exitAnimation.start() |
543 | + isShown = false |
544 | + } |
545 | + |
546 | + MouseArea { |
547 | + z: -1 |
548 | + anchors.fill: parent |
549 | + propagateComposedEvents: true |
550 | + } |
551 | + |
552 | + UbuntuNumberAnimation { |
553 | + id: entranceAnimation |
554 | + target: popup |
555 | + property: "anchors.topMargin" |
556 | + to: showPosition |
557 | + } |
558 | + |
559 | + UbuntuNumberAnimation { |
560 | + id: exitAnimation |
561 | + target: popup |
562 | + property: "anchors.topMargin" |
563 | + to: hidePosition |
564 | + } |
565 | +} |
566 | |
567 | === added file 'qml/components/ZoomButtons.qml' |
568 | --- qml/components/ZoomButtons.qml 1970-01-01 00:00:00 +0000 |
569 | +++ qml/components/ZoomButtons.qml 2016-04-12 18:47:34 +0000 |
570 | @@ -0,0 +1,81 @@ |
571 | +/* |
572 | + * GPS Navigation http://launchpad.net/unav |
573 | + * Copyright (C) 2015-2016 Marcos Alvarez Costales https://launchpad.net/~costales |
574 | + * Copyright (C) 2016 Nekhelesh Ramananthan https://launchpad.net/~nik90 |
575 | + * Copyright (C) 2015-2016 JkB https://launchpad.net/~joergberroth |
576 | + * |
577 | + * GPS Navigation is free software; you can redistribute it and/or modify |
578 | + * it under the terms of the GNU General Public License as published by |
579 | + * the Free Software Foundation; either version 3 of the License, or |
580 | + * (at your option) any later version. |
581 | + * |
582 | + * GPS Navigation is distributed in the hope that it will be useful, |
583 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
584 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
585 | + * GNU General Public License for more details. |
586 | + */ |
587 | + |
588 | +import QtQuick 2.4 |
589 | +import Ubuntu.Components 1.3 |
590 | + |
591 | +Rectangle { |
592 | + id: zoomButtons |
593 | + |
594 | + // Check to ensure zoom animation is executed on app startup |
595 | + property bool isColdStart: true |
596 | + |
597 | + // Signals to zoom in/out |
598 | + signal zoomedIn() |
599 | + signal zoomedOut() |
600 | + |
601 | + color: "Transparent" |
602 | + radius: units.gu(2) |
603 | + width: zoomIn.width + units.gu(2) |
604 | + height: zoomIn.height + zoomOut.height |
605 | + |
606 | + anchors { |
607 | + right: parent.right |
608 | + verticalCenter: parent.verticalCenter |
609 | + verticalCenterOffset: units.gu(-3) |
610 | + } |
611 | + |
612 | + onVisibleChanged: { |
613 | + if (visible && isColdStart) { |
614 | + zoomAnimation.start() |
615 | + isColdStart = false |
616 | + } |
617 | + } |
618 | + |
619 | + Rectangle { |
620 | + opacity: 0.5 |
621 | + radius: parent.radius |
622 | + anchors.fill: parent |
623 | + color: UbuntuColors.jet |
624 | + } |
625 | + |
626 | + ActionIcon { |
627 | + id: zoomIn |
628 | + icon.name: "zoom-in" |
629 | + icon.width: units.gu(3) |
630 | + icon.color: "white" |
631 | + onClicked: zoomedIn() |
632 | + anchors { top: parent.top; left: parent.left } |
633 | + } |
634 | + |
635 | + ActionIcon { |
636 | + id: zoomOut |
637 | + icon.name: "zoom-out" |
638 | + icon.width: units.gu(3) |
639 | + icon.color: "white" |
640 | + onClicked: zoomedOut() |
641 | + anchors { bottom: parent.bottom; left: parent.left } |
642 | + } |
643 | + |
644 | + UbuntuNumberAnimation { |
645 | + id: zoomAnimation |
646 | + target: zoomButtons |
647 | + property: "anchors.rightMargin" |
648 | + from: -zoomButtons.width |
649 | + to: units.gu(-2) |
650 | + } |
651 | +} |
This is wonderful!!!
One point, could you apply this? paste.ubuntu. com/15796951/ s18.postimg. org/pxl6huexh/ Screenshot_ from_2016_ 04_12_19_ 33_54.png
http://
that will fix cut POIs on map, like this orange POI:
http://
Thanks a lot!