Merge lp:~joergberroth/unav/20160328_fixes into lp:unav

Proposed by JkB
Status: Merged
Merged at revision: 8
Proposed branch: lp:~joergberroth/unav/20160328_fixes
Merge into: lp:unav
Diff against target: 415 lines (+92/-73)
10 files modified
nav/index.html (+14/-8)
qml/AboutPage.qml (+1/-1)
qml/PoiListPage.qml (+1/-0)
qml/PoiPage.qml (+1/-2)
qml/RoutePage.qml (+1/-1)
qml/SearchPage.qml (+1/-1)
qml/SettingsPage.qml (+41/-28)
qml/components/ExpandableListItem.qml (+2/-2)
qml/components/HeaderListItem.qml (+0/-30)
qml/components/ListItemHeader.qml (+30/-0)
To merge this branch: bzr merge lp:~joergberroth/unav/20160328_fixes
Reviewer Review Type Date Requested Status
Nekhelesh Ramananthan qml code testing Approve
Review via email: mp+290203@code.launchpad.net

Commit message

*changed Naming of HeaderListItem.qml to ListItemHeader.qml and fixed it in PoiPage.qml, SettingsPage.qml, SearchPage.qml
*PoiListPage.qml: Added WordWrap to subtitles
*RoutePage.qml: reverted topMargin for Grid

**SettingsPage.qml: Made Design of Expandables more intuitive. minor design changes.

***index.html: comment the debug route simulation

Description of the change

The changes from yesterday against the latest branch.
With some more design change proposals to SettingsPage.qml
The way, the expandables expanded felt a bit diffuse. So, here is my proposal

Best Joerg

To post a comment you must log in.
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Hi Joerg, thanks for the fixes. They're mostly good except for some minor issues that I have listed below,

1. The listitem text is not vertically centered in the settings page. See http://imgur.com/2ccNEsq. The tick padding is also incorrect. I also think we shouldn't change the left padding of the text since the rest of the core apps don't do that. I did some testing and this looks good -> http://imgur.com/AzrnFAE

Here is the code diff, http://paste.ubuntu.com/15540311/

2. The delete icon on the list item is also weird. I think the text "Clear History" makes it clear what the listitem action does.

An example from the core app "Clock", we have a settings option "Change Timezone"..the text alone does the job.

3. I already agreed to the name change of HeaderListItem. Just one minor thing, the next time you move/rename a file, please do "bzr mv oldfile newfile". That is more cleaner. For this MP it is good.

4. I don't have any opinion on the index.html file change. I leave that to Marcos.

review: Needs Fixing
Revision history for this message
JkB (joergberroth) wrote :

Am 2016-03-28 um 18:04 schrieb Nekhelesh Ramananthan:
> Review: Needs Fixing
>
> Hi Joerg, thanks for the fixes. They're mostly good except for some minor issues that I have listed below,
>
Hi, thx, too.

> 1. The listitem text is not vertically centered in the settings page. See http://imgur.com/2ccNEsq. The tick padding is also incorrect.
Ah yes, I see.
I also think we shouldn't change the left padding of the text since the
rest of the core apps don't do that.
Well, I think there is no clear separation than. The former approach had
a visible separation. dekko does it via checkboxes.
The only other app I see with the new expandable than is clock.
Try this in clock:
-expand a setting list
-focus another app
- refocus the setting page
...you are totaly lost as you don't get the states at first sight.
I think this is not the best approach.

I did some testing and this looks good -> http://imgur.com/AzrnFAE
I could agree on that, too.
But, please re-think it on base of the expl. above.
Still, i like the indent more as it separates the list/action from the
"header".
>
> Here is the code diff, http://paste.ubuntu.com/15540311/
>
> 2. The delete icon on the list item is also weird. I think the text "Clear History" makes it clear what the listitem action does.

I think the icon clarifys that there is not only text but an action to take.
I had this discussion with marcos, too.
As it is 1:2 now, i will leave it out so far, again ;-) .
>
> An example from the core app "Clock", we have a settings option "Change Timezone"..the text alone does the job.
Can not find this action.... ;-)
> 3. I already agreed to the name change of HeaderListItem. Just one minor thing, the next time you move/rename a file, please do "bzr mv oldfile newfile". That is more cleaner. For this MP it is good.
ah yes, I'll do.

Thanks.

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

> I also think we shouldn't change the left padding of the text since the
> rest of the core apps don't do that.
> Well, I think there is no clear separation than. The former approach had
> a visible separation. dekko does it via checkboxes.
> The only other app I see with the new expandable than is clock.
> Try this in clock:
> -expand a setting list
> -focus another app
> - refocus the setting page
> ...you are totaly lost as you don't get the states at first sight.
> I think this is not the best approach.
>
> I did some testing and this looks good -> http://imgur.com/AzrnFAE
> I could agree on that, too.
> But, please re-think it on base of the expl. above.
> Still, i like the indent more as it separates the list/action from the
> "header".

Alright go with the indentation. But please use padding.leading: units.gu(1) to move the text. Otherwise it breaks the listitemlayout visually. In this case, you might also then want to indent the tick icon. SO add padding.trailing: units.gu(1). Please test this.

> > Here is the code diff, http://paste.ubuntu.com/15540311/
> >
> > 2. The delete icon on the list item is also weird. I think the text "Clear
> History" makes it clear what the listitem action does./me
>
> I think the icon clarifys that there is not only text but an action to take.
> I had this discussion with marcos, too.
> As it is 1:2 now, i will leave it out so far, again ;-) .

Now that uNav is a core app shipped by default on the phone, it is even more important that it follows the design standards of other core apps like Dekko, Clock, Weather, Music app etc. None of those apps display such an icon in a list item. We want to maintain consistency. That's what I am trying to get at.

> >
> > An example from the core app "Clock", we have a settings option "Change
> Timezone"..the text alone does the job.
> Can not find this action.... ;-)

Its in the clock app settings page right at the bottom.

Revision history for this message
JkB (joergberroth) wrote :

Am 2016-03-28 um 19:45 schrieb Nekhelesh Ramananthan:

>
> Alright go with the indentation. But please use padding.leading: units.gu(1) to move the text. Otherwise it breaks the listitemlayout visually. In this case, you might also then want to indent the tick icon. SO add padding.trailing: units.gu(1). Please test this.
Just updated the branch. Have a look. What do you think?

> Now that uNav is a core app shipped by default on the phone, it is even more important that it follows the design standards of other core apps like Dekko, Clock, Weather, Music app etc. None of those apps display such an icon in a list item. We want to maintain consistency. That's what I am trying to get at.

I fully see this!,

>>> An example from the core app "Clock", we have a settings option "Change
>> Timezone"..the text alone does the job.
>> Can not find this action.... ;-)
> Its in the clock app settings page right at the bottom.
but this action also (at least in the latest rc-prop version I am using)
has an arrow as action indication ( and leads me to the system-setting page)

>
Best Joerg

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

> > Alright go with the indentation. But please use padding.leading: units.gu(1)
> to move the text. Otherwise it breaks the listitemlayout visually. In this
> case, you might also then want to indent the tick icon. SO add
> padding.trailing: units.gu(1). Please test this.
>
> Just updated the branch. Have a look. What do you think?

I think visually it is okay, but I'm not happy with the code. Please use padding.leading and padding.trailing to adjust the indentation instead of anchors. Refer to SlotsLayout documentation [1] Also while running your code, I saw warnings like Reference error: Unit is not defined and so on.

Also since you hid the subtitle and the divider when its expanded, how about we remove the indentation and instead change the font color of the options shown?

[1] https://developer.ubuntu.com/api/apps/qml/sdk-15.04.1/Ubuntu.Components.SlotsLayout/

>
> > Now that uNav is a core app shipped by default on the phone, it is even more
> important that it follows the design standards of other core apps like Dekko,
> Clock, Weather, Music app etc. None of those apps display such an icon in a
> list item. We want to maintain consistency. That's what I am trying to get at.
>
> I fully see this!,
>
> >>> An example from the core app "Clock", we have a settings option "Change
> >> Timezone"..the text alone does the job.
> >> Can not find this action.... ;-)
> > Its in the clock app settings page right at the bottom.
> but this action also (at least in the latest rc-prop version I am using)
> has an arrow as action indication ( and leads me to the system-setting page)
>

Yes the arrow is a standard design pattern used to indicate that it opens a new page. Had we instead shown a dialog, we would not have used any icon there. I spoke to the canonical designers about this.

lp:~joergberroth/unav/20160328_fixes updated
5. By JkB

* improved expandable behaviour in SettingsPage.qml

6. By JkB

* fixed ListItemHeader in AboutPage.qml

* changed font weight back to standard medium for ListItemHeaders

7. By JkB

*exchanged indent-separation with color separation

Revision history for this message
JkB (joergberroth) wrote :

Am 2016-03-28 um 20:16 schrieb Nekhelesh Ramananthan:
>
> Also since you hid the subtitle and the divider when its expanded, how about we remove the indentation and instead change the font color of the options shown?
That does the trick. Branch updated

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Looks great Joerg! Awesome work! One minor nitpick I have to point out,

why is the listview height (12+1)? It leaves 1 gu gap at the bottom that doesn't look so good :P. Can you remove that? Everything else is good.

review: Needs Fixing
Revision history for this message
JkB (joergberroth) wrote :

My one designer eye ;-) says that it looks better with that gap.
Really, it separates it better to the following...

Am 2016-03-28 um 21:15 schrieb Nekhelesh Ramananthan:
> Review: Needs Fixing
>
> Looks great Joerg! Awesome work! One minor nitpick I have to point out,
>
> why is the listview height (12+1)? It leaves 1 gu gap at the bottom that doesn't look so good :P. Can you remove that? Everything else is good.
>

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Alrite I give in ;-). Code looks good and works well. Approving. I will leave this in the hands of Marcos to review the index.html code change.

review: Approve (qml code testing)
Revision history for this message
costales (costales) wrote :

Thanks a lot Joerg |o/
The index.html is right for me :)
Merged!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'nav/index.html'
--- nav/index.html 2016-03-26 18:53:17 +0000
+++ nav/index.html 2016-03-28 19:01:41 +0000
@@ -260,10 +260,12 @@
260 if (!navigator.geolocation) {260 if (!navigator.geolocation) {
261 $('#gps_denied').show();261 $('#gps_denied').show();
262 return;262 return;
263 }263 }
264
265264
266 // TODO release BEGIN remove debug265 /**
266 // *TESTING* This block is for testing purposes only. It simulates a route
267 // and should be removed before every release.
268 // TODO release BEGIN remove debug
267 var route = [269 var route = [
268 [43.51557,-5.655146666666667],[43.515764999999995,-5.655245000000001],[43.515955,-5.655354999999999],[43.51614333333334,-5.655476666666668],[43.51633,-5.655601666666667],[43.516515,-5.6557216666666665],[43.516695,-5.655835],[43.516871666666674,-5.655946666666667],[43.517039999999994,-5.656053333333333],[43.517208333333336,-5.6561650000000006],[43.517363333333336,-5.656270000000001],[43.517515,-5.656368333333334],[43.51765833333334,-5.656464999999999],[43.51779333333334,-5.6565666666666665],[43.51792333333333,-5.656670000000001],[43.518055000000004,-5.656765],[43.518188333333335,-5.656851666666667],[43.518323333333335,-5.656935000000001],[43.518458333333335,-5.657018333333333],[43.518591666666666,-5.657103333333334],[43.518724999999996,-5.657188333333333],[43.51885666666667,-5.657273333333334],[43.51898500000001,-5.657354999999999],[43.51910833333333,-5.6574366666666664],[43.51923,-5.657515000000001],[43.51935166666667,-5.657591666666667],[43.51946833333333,-5.657673333333334],[43.51958333333334,-5.65776],[43.51969166666666,-5.657848333333334],[43.519800000000004,-5.657933333333333],[43.519909999999996,-5.658021666666667],[43.520021666666665,-5.658115],[43.520134999999996,-5.658213333333333],[43.520224999999996,-5.658365],[43.520273333333336,-5.658556666666668],[43.520296666666674,-5.6587733333333325],[43.52031,-5.65899],[43.520329999999994,-5.659196666666666],[43.52035166666666,-5.6594],[43.52037833333334,-5.6595949999999995],[43.520405,-5.659795000000001],[43.520431666666674,-5.659996666666666],[43.52046166666667,-5.660196666666667],[43.52049999999999,-5.660386666666667],[43.52054,-5.660563333333332],[43.52058166666667,-5.660741666666667],[43.52062166666666,-5.6609266666666676],[43.52066833333333,-5.6611183333333335],[43.52072166666667,-5.661316666666666],[43.520786666666666,-5.661518333333333],[43.520865,-5.661720000000001],[43.52095333333333,-5.661916666666667],[43.521049999999995,-5.662096666666668],[43.521151666666675,-5.662258333333334],[43.52125833333333,-5.662405],[43.521363333333326,-5.662538333333333],[43.52146666666666,-5.662656666666667],[43.52155833333333,-5.662758333333333],[43.521634999999996,-5.66284],[43.52169666666667,-5.6629016666666665],[43.52174,-5.662941666666668],[43.52177,-5.66297],[43.52178833333334,-5.662984999999999],[43.52179666666666,-5.662993333333333],[43.5218,-5.6629950000000004],[43.5218,-5.662993333333333],[43.52182,-5.663011666666667],[43.52185166666666,-5.663041666666667],[43.521894999999994,-5.663076666666666],[43.521945,-5.6631149999999995],[43.52201,-5.663164999999999],[43.52208166666666,-5.663216666666667],[43.52216,-5.66327],[43.52225,-5.663326666666667],[43.52235166666666,-5.663381666666667],[43.52246333333333,-5.663433333333334],[43.52258,-5.663478333333334],[43.52269666666666,-5.663518333333333],[43.522816666666664,-5.66355],[43.52293666666666,-5.663576666666668],[43.52306,-5.663595],[43.52318166666667,-5.663603333333333],[43.523303333333324,-5.663605],[43.52342166666667,-5.663600000000001],[43.523541666666674,-5.663588333333333],[43.52366,-5.66357],[43.52378166666667,-5.663544999999999],[43.52390666666667,-5.6635133333333325],[43.52403833333333,-5.663475],[43.524175,-5.663433333333334],[43.524316666666664,-5.66339],[43.52445833333333,-5.6633466666666665],[43.52459833333334,-5.6633033333333325],[43.52474,-5.663258333333332],[43.52488166666667,-5.663213333333334],[43.52502333333334,-5.663170000000001],[43.52516833333334,-5.663128333333333],[43.525310000000005,-5.6630899999999995],[43.52545333333334,-5.663056666666667],[43.52559666666666,-5.663023333333332],[43.52574,-5.662986666666666],[43.52588333333333,-5.662945000000001],[43.52602666666667,-5.6629033333333325],[43.52617,-5.66286],[43.526309999999995,-5.662816666666667],[43.52645166666666,-5.662774999999999],[43.526595,-5.662733333333334],[43.526738333333334,-5.66269],[43.52688,-5.6626433333333335],[43.52702166666666,-5.662598333333333],[43.52716166666667,-5.662554999999999],[43.52729666666667,-5.662515],[43.52742,-5.662476666666667],[43.52753333333333,-5.662441666666666],[43.527635,-5.6624083333333335],[43.527725,-5.662374999999999],[43.52780500000001,-5.662344999999999],[43.52787,-5.662319999999999],[43.527925,-5.662303333333334],[43.52797166666666,-5.66229],[43.528009999999995,-5.662276666666666],[43.52804166666667,-5.662266666666667],[43.52806666666667,-5.662256666666667],[43.52807833333333,-5.66225],[43.52808166666667,-5.66225],[43.52808,-5.662248333333334],[43.52807833333333,-5.6622466666666655]270 [43.51557,-5.655146666666667],[43.515764999999995,-5.655245000000001],[43.515955,-5.655354999999999],[43.51614333333334,-5.655476666666668],[43.51633,-5.655601666666667],[43.516515,-5.6557216666666665],[43.516695,-5.655835],[43.516871666666674,-5.655946666666667],[43.517039999999994,-5.656053333333333],[43.517208333333336,-5.6561650000000006],[43.517363333333336,-5.656270000000001],[43.517515,-5.656368333333334],[43.51765833333334,-5.656464999999999],[43.51779333333334,-5.6565666666666665],[43.51792333333333,-5.656670000000001],[43.518055000000004,-5.656765],[43.518188333333335,-5.656851666666667],[43.518323333333335,-5.656935000000001],[43.518458333333335,-5.657018333333333],[43.518591666666666,-5.657103333333334],[43.518724999999996,-5.657188333333333],[43.51885666666667,-5.657273333333334],[43.51898500000001,-5.657354999999999],[43.51910833333333,-5.6574366666666664],[43.51923,-5.657515000000001],[43.51935166666667,-5.657591666666667],[43.51946833333333,-5.657673333333334],[43.51958333333334,-5.65776],[43.51969166666666,-5.657848333333334],[43.519800000000004,-5.657933333333333],[43.519909999999996,-5.658021666666667],[43.520021666666665,-5.658115],[43.520134999999996,-5.658213333333333],[43.520224999999996,-5.658365],[43.520273333333336,-5.658556666666668],[43.520296666666674,-5.6587733333333325],[43.52031,-5.65899],[43.520329999999994,-5.659196666666666],[43.52035166666666,-5.6594],[43.52037833333334,-5.6595949999999995],[43.520405,-5.659795000000001],[43.520431666666674,-5.659996666666666],[43.52046166666667,-5.660196666666667],[43.52049999999999,-5.660386666666667],[43.52054,-5.660563333333332],[43.52058166666667,-5.660741666666667],[43.52062166666666,-5.6609266666666676],[43.52066833333333,-5.6611183333333335],[43.52072166666667,-5.661316666666666],[43.520786666666666,-5.661518333333333],[43.520865,-5.661720000000001],[43.52095333333333,-5.661916666666667],[43.521049999999995,-5.662096666666668],[43.521151666666675,-5.662258333333334],[43.52125833333333,-5.662405],[43.521363333333326,-5.662538333333333],[43.52146666666666,-5.662656666666667],[43.52155833333333,-5.662758333333333],[43.521634999999996,-5.66284],[43.52169666666667,-5.6629016666666665],[43.52174,-5.662941666666668],[43.52177,-5.66297],[43.52178833333334,-5.662984999999999],[43.52179666666666,-5.662993333333333],[43.5218,-5.6629950000000004],[43.5218,-5.662993333333333],[43.52182,-5.663011666666667],[43.52185166666666,-5.663041666666667],[43.521894999999994,-5.663076666666666],[43.521945,-5.6631149999999995],[43.52201,-5.663164999999999],[43.52208166666666,-5.663216666666667],[43.52216,-5.66327],[43.52225,-5.663326666666667],[43.52235166666666,-5.663381666666667],[43.52246333333333,-5.663433333333334],[43.52258,-5.663478333333334],[43.52269666666666,-5.663518333333333],[43.522816666666664,-5.66355],[43.52293666666666,-5.663576666666668],[43.52306,-5.663595],[43.52318166666667,-5.663603333333333],[43.523303333333324,-5.663605],[43.52342166666667,-5.663600000000001],[43.523541666666674,-5.663588333333333],[43.52366,-5.66357],[43.52378166666667,-5.663544999999999],[43.52390666666667,-5.6635133333333325],[43.52403833333333,-5.663475],[43.524175,-5.663433333333334],[43.524316666666664,-5.66339],[43.52445833333333,-5.6633466666666665],[43.52459833333334,-5.6633033333333325],[43.52474,-5.663258333333332],[43.52488166666667,-5.663213333333334],[43.52502333333334,-5.663170000000001],[43.52516833333334,-5.663128333333333],[43.525310000000005,-5.6630899999999995],[43.52545333333334,-5.663056666666667],[43.52559666666666,-5.663023333333332],[43.52574,-5.662986666666666],[43.52588333333333,-5.662945000000001],[43.52602666666667,-5.6629033333333325],[43.52617,-5.66286],[43.526309999999995,-5.662816666666667],[43.52645166666666,-5.662774999999999],[43.526595,-5.662733333333334],[43.526738333333334,-5.66269],[43.52688,-5.6626433333333335],[43.52702166666666,-5.662598333333333],[43.52716166666667,-5.662554999999999],[43.52729666666667,-5.662515],[43.52742,-5.662476666666667],[43.52753333333333,-5.662441666666666],[43.527635,-5.6624083333333335],[43.527725,-5.662374999999999],[43.52780500000001,-5.662344999999999],[43.52787,-5.662319999999999],[43.527925,-5.662303333333334],[43.52797166666666,-5.66229],[43.528009999999995,-5.662276666666666],[43.52804166666667,-5.662266666666667],[43.52806666666667,-5.662256666666667],[43.52807833333333,-5.66225],[43.52808166666667,-5.66225],[43.52808,-5.662248333333334],[43.52807833333333,-5.6622466666666655]
269 ];271 ];
@@ -336,10 +338,9 @@
336 },800);338 },800);
337 return;339 return;
338 // TODO release END remove debug340 // TODO release END remove debug
339 341 // *TESTING* End
340 342 **/
341 343
342
343 id_gps = navigator.geolocation.watchPosition(344 id_gps = navigator.geolocation.watchPosition(
344 function (pos) {345 function (pos) {
345 346
@@ -451,7 +452,10 @@
451 longpress = (endTime - startTime < 225) ? false : true;452 longpress = (endTime - startTime < 225) ? false : true;
452 });453 });
453 454
454 // TODO release BEGIN remove debug455 /**
456 // *TESTING* This block is for testing purposes only. It simulates a route
457 // and should be removed before every release.
458 // TODO release BEGIN remove debug
455 $("#map").on('mousedown', function () {459 $("#map").on('mousedown', function () {
456 startTime = new Date().getTime();460 startTime = new Date().getTime();
457 });461 });
@@ -460,6 +464,8 @@
460 longpress = (endTime - startTime < 225) ? false : true;464 longpress = (endTime - startTime < 225) ? false : true;
461 });465 });
462 // TODO release END remove debug466 // TODO release END remove debug
467 //*TESTING* END
468 **/
463 469
464 // Drag470 // Drag
465 map.on('pointerdrag', function(evt) {471 map.on('pointerdrag', function(evt) {
466472
=== modified file 'qml/AboutPage.qml'
--- qml/AboutPage.qml 2016-03-26 18:53:17 +0000
+++ qml/AboutPage.qml 2016-03-28 19:01:41 +0000
@@ -100,7 +100,7 @@
100 anchors.fill: parent100 anchors.fill: parent
101 section.property: "category"101 section.property: "category"
102 section.criteria: ViewSection.FullString102 section.criteria: ViewSection.FullString
103 section.delegate: HeaderListItem {103 section.delegate: ListItemHeader {
104 title: section104 title: section
105 }105 }
106106
107107
=== modified file 'qml/PoiListPage.qml'
--- qml/PoiListPage.qml 2016-03-26 21:16:49 +0000
+++ qml/PoiListPage.qml 2016-03-28 19:01:41 +0000
@@ -326,6 +326,7 @@
326 subtitle.text: model.openinghours !== "" ? "%1 | %2".arg(getOpeningHours(model.openinghours)).arg(QmlJs.formatDistance(model.distance, navApp.settings.unit))326 subtitle.text: model.openinghours !== "" ? "%1 | %2".arg(getOpeningHours(model.openinghours)).arg(QmlJs.formatDistance(model.distance, navApp.settings.unit))
327 : QmlJs.formatDistance(model.distance, navApp.settings.unit)327 : QmlJs.formatDistance(model.distance, navApp.settings.unit)
328 subtitle.maximumLineCount: 2328 subtitle.maximumLineCount: 2
329 subtitle.wrapMode: Text.WordWrap
329 summary.text: model.description330 summary.text: model.description
330 summary.maximumLineCount: 3331 summary.maximumLineCount: 3
331332
332333
=== modified file 'qml/PoiPage.qml'
--- qml/PoiPage.qml 2016-03-27 10:05:20 +0000
+++ qml/PoiPage.qml 2016-03-28 19:01:41 +0000
@@ -157,7 +157,7 @@
157 width: parent.width157 width: parent.width
158 height: sectionHeader.height158 height: sectionHeader.height
159159
160 HeaderListItem {160 ListItemHeader {
161 id: sectionHeader161 id: sectionHeader
162 title: section162 title: section
163 }163 }
@@ -191,4 +191,3 @@
191 }191 }
192}192}
193193
194
195194
=== modified file 'qml/RoutePage.qml'
--- qml/RoutePage.qml 2016-03-26 18:53:17 +0000
+++ qml/RoutePage.qml 2016-03-28 19:01:41 +0000
@@ -31,7 +31,7 @@
31 Flickable {31 Flickable {
32 id: flickable32 id: flickable
3333
34 anchors { fill: parent; margins: units.gu(2) }34 anchors { fill: parent; margins: units.gu(2); topMargin: units.gu(6) }
35 height: contentItem.childrenRect.height35 height: contentItem.childrenRect.height
36 boundsBehavior: (contentHeight > routePage.height) ? Flickable.DragAndOvershootBounds : Flickable.StopAtBounds36 boundsBehavior: (contentHeight > routePage.height) ? Flickable.DragAndOvershootBounds : Flickable.StopAtBounds
3737
3838
=== modified file 'qml/SearchPage.qml'
--- qml/SearchPage.qml 2016-03-26 18:53:17 +0000
+++ qml/SearchPage.qml 2016-03-28 19:01:41 +0000
@@ -230,7 +230,7 @@
230230
231 section.property: "title"231 section.property: "title"
232 section.criteria: ViewSection.FullString232 section.criteria: ViewSection.FullString
233 section.delegate: HeaderListItem {233 section.delegate: ListItemHeader {
234 title: section234 title: section
235 }235 }
236236
237237
=== modified file 'qml/SettingsPage.qml'
--- qml/SettingsPage.qml 2016-03-26 18:53:17 +0000
+++ qml/SettingsPage.qml 2016-03-28 19:01:41 +0000
@@ -40,7 +40,7 @@
40 navigationModeModel.append({ "mode": i18n.tr("Walking"), "index": 1 })40 navigationModeModel.append({ "mode": i18n.tr("Walking"), "index": 1 })
41 navigationModeModel.append({ "mode": i18n.tr("Bicycle"), "index": 2 })41 navigationModeModel.append({ "mode": i18n.tr("Bicycle"), "index": 2 })
4242
43 _modeList.subText.text = navigationModeModel.get(navApp.settings.routingMode).mode43 modeList.subText.text = navigationModeModel.get(navApp.settings.routingMode).mode
44 }44 }
45 }45 }
4646
@@ -52,7 +52,7 @@
52 soundModel.append({ "sound": i18n.tr("A Notification"), "index": 1 })52 soundModel.append({ "sound": i18n.tr("A Notification"), "index": 1 })
53 soundModel.append({ "sound": i18n.tr("None"), "index": 2 })53 soundModel.append({ "sound": i18n.tr("None"), "index": 2 })
5454
55 _soundList.subText.text = soundModel.get(navApp.settings.soundIndications).sound55 soundList.subText.text = soundModel.get(navApp.settings.soundIndications).sound
56 }56 }
57 }57 }
5858
@@ -63,7 +63,7 @@
63 unitModel.append({ "unit": i18n.tr("Kilometres"), "index": 0 })63 unitModel.append({ "unit": i18n.tr("Kilometres"), "index": 0 })
64 unitModel.append({ "unit": i18n.tr("Miles"), "index": 1 })64 unitModel.append({ "unit": i18n.tr("Miles"), "index": 1 })
6565
66 _unitList.subText.text = unitModel.get(navApp.settings.unit).unit66 unitList.subText.text = unitModel.get(navApp.settings.unit).unit
67 }67 }
68 }68 }
6969
@@ -81,22 +81,30 @@
81 right: parent.right81 right: parent.right
82 }82 }
8383
84 ListItemHeader {
85 id: navigationListHeader
86 title: i18n.tr("Navigation")
87 }
88
84 ExpandableListItem {89 ExpandableListItem {
85 id: _modeList90 id: modeList
8691
87 listViewHeight: units.gu(21)92 listViewHeight: units.gu(12+1)
88 titleText.text: i18n.tr("Navigation Mode")93 titleText.text: i18n.tr("Navigation Mode")
8994
90 model: navigationModeModel95 model: navigationModeModel
9196
92 delegate: ListItem {97 delegate: ListItem {
98 divider.visible: false
99 height: navigationListItemLayout.height
93 ListItemLayout {100 ListItemLayout {
101 id: navigationListItemLayout
94 title.text: model.mode102 title.text: model.mode
95103 title.color: "#5D5D5D"
104 padding { top: units.gu(1); bottom: units.gu(1) }
96 Icon {105 Icon {
97 SlotsLayout.position: SlotsLayout.Trailing106 SlotsLayout.position: SlotsLayout.Trailing
98 width: units.gu(2)107 width: units.gu(2)
99 height: width
100 name: "tick"108 name: "tick"
101 visible: navApp.settings.routingMode === model.index109 visible: navApp.settings.routingMode === model.index
102 }110 }
@@ -105,8 +113,8 @@
105 onClicked: {113 onClicked: {
106 navApp.settings.routingMode = model.index114 navApp.settings.routingMode = model.index
107 mainPageStack.executeJavaScript("if (nav.get_route_status() != 'no' && !nav.get_route_status().startsWith('simulate')){nav.set_route_status('waiting4signal')}; settings.set_routing_mode(" + model.index +");")115 mainPageStack.executeJavaScript("if (nav.get_route_status() != 'no' && !nav.get_route_status().startsWith('simulate')){nav.set_route_status('waiting4signal')}; settings.set_routing_mode(" + model.index +");")
108 _modeList.subText.text = navigationModeModel.get(navApp.settings.routingMode).mode116 modeList.subText.text = navigationModeModel.get(navApp.settings.routingMode).mode
109 _modeList.toggleExpansion()117 modeList.toggleExpansion()
110 }118 }
111 }119 }
112 }120 }
@@ -152,21 +160,24 @@
152 }160 }
153161
154 ExpandableListItem {162 ExpandableListItem {
155 id: _soundList163 id: soundList
156164
157 listViewHeight: units.gu(21)165 listViewHeight: units.gu(12+1)
158 titleText.text: i18n.tr("Guidance")166 titleText.text: i18n.tr("Guidance")
159167
160 model: soundModel168 model: soundModel
161169
162 delegate: ListItem {170 delegate: ListItem {
171 divider.visible: false
172 height: soundListItemLayout.height
163 ListItemLayout {173 ListItemLayout {
174 id: soundListItemLayout
164 title.text: model.sound175 title.text: model.sound
165176 title.color: "#5D5D5D"
177 padding { top: units.gu(1); bottom: units.gu(1) }
166 Icon {178 Icon {
167 SlotsLayout.position: SlotsLayout.Trailing179 SlotsLayout.position: SlotsLayout.Trailing
168 width: units.gu(2)180 width: units.gu(2)
169 height: width
170 name: "tick"181 name: "tick"
171 visible: navApp.settings.soundIndications === model.index182 visible: navApp.settings.soundIndications === model.index
172 }183 }
@@ -175,33 +186,36 @@
175 onClicked: {186 onClicked: {
176 navApp.settings.soundIndications = model.index187 navApp.settings.soundIndications = model.index
177 mainPageStack.executeJavaScript("settings.set_sound(" + model.index + ");")188 mainPageStack.executeJavaScript("settings.set_sound(" + model.index + ");")
178 _soundList.subText.text = soundModel.get(navApp.settings.soundIndications).sound189 soundList.subText.text = soundModel.get(navApp.settings.soundIndications).sound
179 _soundList.toggleExpansion()190 soundList.toggleExpansion()
180 }191 }
181 }192 }
182 }193 }
183194
184 HeaderListItem {195 ListItemHeader {
185 id: mapListHeader196 id: mapListHeader
186 title: i18n.tr("Map")197 title: i18n.tr("Map")
187 }198 }
188199
189 ExpandableListItem {200 ExpandableListItem {
190 id: _unitList201 id: unitList
191202
192 listViewHeight: units.gu(14)203 listViewHeight: units.gu(8+1)
193 titleText.text: i18n.tr("Units")204 titleText.text: i18n.tr("Units")
194205
195 model: unitModel206 model: unitModel
196207
197 delegate: ListItem {208 delegate: ListItem {
209 divider.visible: false
210 height: unitListItemLayout.height
198 ListItemLayout {211 ListItemLayout {
212 id: unitListItemLayout
199 title.text: model.unit213 title.text: model.unit
200214 title.color: "#5D5D5D"
215 padding { top: units.gu(1); bottom: units.gu(1) }
201 Icon {216 Icon {
202 SlotsLayout.position: SlotsLayout.Trailing217 SlotsLayout.position: SlotsLayout.Trailing
203 width: units.gu(2)218 width: units.gu(2)
204 height: width
205 name: "tick"219 name: "tick"
206 visible: navApp.settings.unit === model.index220 visible: navApp.settings.unit === model.index
207 }221 }
@@ -211,13 +225,13 @@
211 navApp.settings.unit = model.index225 navApp.settings.unit = model.index
212 mainPageStack.executeJavaScript("settings.set_unit(\'" + ( model.index === 0 ? "km" : "mi" ) +"\');")226 mainPageStack.executeJavaScript("settings.set_unit(\'" + ( model.index === 0 ? "km" : "mi" ) +"\');")
213 mainPageStack.executeJavaScript("ui.set_scale_unit(\'" + ( navApp.settings.unit === 0 ? "km" : "mi" ) +"\');")227 mainPageStack.executeJavaScript("ui.set_scale_unit(\'" + ( navApp.settings.unit === 0 ? "km" : "mi" ) +"\');")
214 _unitList.subText.text = unitModel.get(navApp.settings.unit).unit228 unitList.subText.text = unitModel.get(navApp.settings.unit).unit
215 _unitList.toggleExpansion()229 unitList.toggleExpansion()
216 }230 }
217 }231 }
218 }232 }
219233
220 HeaderListItem {234 ListItemHeader {
221 id: privacyListHeader235 id: privacyListHeader
222 title: i18n.tr("History")236 title: i18n.tr("History")
223 }237 }
@@ -237,9 +251,8 @@
237 }251 }
238252
239 ListItem {253 ListItem {
240 Label {254 ListItemLayout {
241 anchors { verticalCenter: parent.verticalCenter; left: parent.left; leftMargin: units.gu(2) }255 title.text: i18n.tr("Clear History")
242 text: i18n.tr("Clear History")
243 }256 }
244 onClicked: PopupUtils.open(confirmEraseHistory)257 onClicked: PopupUtils.open(confirmEraseHistory)
245 }258 }
@@ -251,6 +264,7 @@
251 id: dialogueErase264 id: dialogueErase
252 title: i18n.tr("Clear History")265 title: i18n.tr("Clear History")
253 text: i18n.tr("You'll delete the current history")266 text: i18n.tr("You'll delete the current history")
267
254 Button {268 Button {
255 text: i18n.tr("Delete")269 text: i18n.tr("Delete")
256 color: UbuntuColors.red270 color: UbuntuColors.red
@@ -259,6 +273,7 @@
259 PopupUtils.close(dialogueErase);273 PopupUtils.close(dialogueErase);
260 }274 }
261 }275 }
276
262 Button {277 Button {
263 text: i18n.tr("Cancel")278 text: i18n.tr("Cancel")
264 onClicked: PopupUtils.close(dialogueErase)279 onClicked: PopupUtils.close(dialogueErase)
@@ -279,7 +294,5 @@
279 }294 }
280 }295 }
281 }296 }
282
283 }297 }
284}298}
285
286299
=== modified file 'qml/components/ExpandableListItem.qml'
--- qml/components/ExpandableListItem.qml 2016-03-26 18:53:17 +0000
+++ qml/components/ExpandableListItem.qml 2016-03-28 19:01:41 +0000
@@ -45,12 +45,12 @@
45 ListItem {45 ListItem {
46 id: headerListItem46 id: headerListItem
47 height: expandableHeader.height + divider.height47 height: expandableHeader.height + divider.height
4848 divider.visible: false
49 ListItemLayout {49 ListItemLayout {
50 id: expandableHeader50 id: expandableHeader
5151
52 subtitle.textSize: Label.Medium52 subtitle.textSize: Label.Medium
5353 subtitle.visible: !expansion.expanded
54 Icon {54 Icon {
55 id: arrow55 id: arrow
5656
5757
=== removed file 'qml/components/HeaderListItem.qml'
--- qml/components/HeaderListItem.qml 2016-03-26 18:53:17 +0000
+++ qml/components/HeaderListItem.qml 1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
1/*
2 * uNav http://launchpad.net/unav
3 * Copyright (C) 2016 Nekhelesh Ramananthan https://launchpad.net/~nik90
4 *
5 * uNav is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * uNav 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
16import QtQuick 2.4
17import Ubuntu.Components 1.3
18
19ListItem {
20 id: headerListItem
21
22 property string title
23
24 height: units.gu(4)
25 Label {
26 anchors { verticalCenter: parent.verticalCenter; left: parent.left; leftMargin: units.gu(2) }
27 text: title
28 font.bold: true
29 }
30}
310
=== added file 'qml/components/ListItemHeader.qml'
--- qml/components/ListItemHeader.qml 1970-01-01 00:00:00 +0000
+++ qml/components/ListItemHeader.qml 2016-03-28 19:01:41 +0000
@@ -0,0 +1,30 @@
1/*
2 * uNav http://launchpad.net/unav
3 * Copyright (C) 2016 Nekhelesh Ramananthan https://launchpad.net/~nik90
4 *
5 * uNav is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * uNav 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
16import QtQuick 2.4
17import Ubuntu.Components 1.3
18
19ListItem {
20 id: headerListItem
21
22 property string title
23
24 height: units.gu(4)
25 Label {
26 anchors { verticalCenter: parent.verticalCenter; left: parent.left; leftMargin: units.gu(2) }
27 text: title
28 font.bold: false
29 }
30}

Subscribers

People subscribed via source and target branches