Merge lp:~nik90/unav/bitesize-coords into lp:unav

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 74
Merged at revision: 52
Proposed branch: lp:~nik90/unav/bitesize-coords
Merge into: lp:unav
Prerequisite: lp:~nik90/unav/marcos-menu-structure
Diff against target: 82 lines (+44/-14)
1 file modified
qml/Coordinate.qml (+44/-14)
To merge this branch: bzr merge lp:~nik90/unav/bitesize-coords
Reviewer Review Type Date Requested Status
JkB Approve
costales Approve
Review via email: mp+292153@code.launchpad.net

Description of the change

Tiny bitesize useability fix in the coordinates page. Pressing "N" would switch to "S" instead of showing you a full screen keyboard which is a waste.

This also prevents users from entering a wrong letter and aids the user. Also one less reason for the user to not use the keyboard ;)

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

+1 Thanks!

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

approve!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Coordinate.qml'
2--- qml/Coordinate.qml 2016-04-18 14:02:25 +0000
3+++ qml/Coordinate.qml 2016-04-18 14:02:25 +0000
4@@ -209,12 +209,28 @@
5 width: units.gu(1)
6 }
7
8- TextField {
9- id: lat2d
10- hasClearButton: false
11- width: units.gu(5)
12- maximumLength: 1
13- placeholderText: 'N'
14+ UbuntuShape {
15+ width: units.gu(4)
16+ height: lat2c.height
17+ backgroundColor: lat2dMouseArea.pressed ? UbuntuColors.blue : "White"
18+
19+ Label {
20+ id: lat2d
21+ anchors.centerIn: parent
22+ text: "N"
23+ color: lat2dMouseArea.pressed ? "White" : UbuntuColors.slate
24+ }
25+
26+ MouseArea {
27+ id: lat2dMouseArea
28+ anchors.fill: parent
29+ onClicked: {
30+ if (lat2d.text === "N")
31+ lat2d.text = "S"
32+ else
33+ lat2d.text = "N"
34+ }
35+ }
36 }
37 }
38
39@@ -264,12 +280,28 @@
40 width: units.gu(1)
41 }
42
43- TextField {
44- id: lng2d
45- hasClearButton: false
46- width: units.gu(5)
47- maximumLength: 1
48- placeholderText: 'W'
49+ UbuntuShape {
50+ width: units.gu(4)
51+ height: lng2c.height
52+ backgroundColor: lng2dMouseArea.pressed ? UbuntuColors.blue : "White"
53+
54+ Label {
55+ id: lng2d
56+ anchors.centerIn: parent
57+ text: "W"
58+ color: lng2dMouseArea.pressed ? "White" : UbuntuColors.slate
59+ }
60+
61+ MouseArea {
62+ id: lng2dMouseArea
63+ anchors.fill: parent
64+ onClicked: {
65+ if (lng2d.text === "W")
66+ lng2d.text = "E"
67+ else
68+ lng2d.text = "W"
69+ }
70+ }
71 }
72 }
73
74@@ -287,8 +319,6 @@
75 lat2b.text === "" ? lat2b.text = lat2b.placeholderText : undefined
76 lng2c.text === "" ? lng2c.text = lng2c.placeholderText : undefined
77 lat2c.text === "" ? lat2c.text = lat2c.placeholderText : undefined
78- lng2d.text === "" ? lng2d.text = lng2d.placeholderText : undefined
79- lat2d.text === "" ? lat2d.text = lat2d.placeholderText : undefined
80
81 try {
82 var aux_lat_day = parseInt(lat2a.text);

Subscribers

People subscribed via source and target branches