Merge lp:~rpadovani/ubuntu-calculator-app/1365564 into lp:~ubuntu-calculator-dev/ubuntu-calculator-app/old_trunk
- 1365564
- Merge into old_trunk
Status: | Merged |
---|---|
Approved by: | Alan Pope πΊπ§π± π¦ |
Approved revision: | 325 |
Merged at revision: | 339 |
Proposed branch: | lp:~rpadovani/ubuntu-calculator-app/1365564 |
Merge into: | lp:~ubuntu-calculator-dev/ubuntu-calculator-app/old_trunk |
Diff against target: |
783 lines (+42/-516) 9 files modified
Simple/CalcLabel.qml (+1/-53) Simple/Memory.qml (+1/-2) Simple/Screen.qml (+2/-115) Simple/SimplePage.qml (+33/-106) images/dot.svg (+0/-74) images/edit.svg (+0/-81) images/generate.py (+0/-24) tests/autopilot/ubuntu_calculator_app/__init__.py (+5/-13) tests/autopilot/ubuntu_calculator_app/tests/test_screen.py (+0/-48) |
To merge this branch: | bzr merge lp:~rpadovani/ubuntu-calculator-app/1365564 |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Mihir Soni | Approve | ||
Review via email: mp+233400@code.launchpad.net |
Commit message
Removed labels from calculations, as per-design request
Description of the change
Removed labels from calculations, as per-design request
Alan Pope πΊπ§π± π¦ (popey) wrote : | # |
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:321
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Riccardo Padovani (rpadovani) wrote : | # |
Ok, seems tests work well.
I build a click, you can find it here: http://
Mihir Soni (mihirsoni) wrote : | # |
Looks good to me thanks a lot Riccardo ?
Don't you think we should increase number limit ?
Alan Pope πΊπ§π± π¦ (popey) wrote : | # |
Have requested John Lea review.
Nicholas Skaggs (nskaggs) wrote : | # |
LOL Riccardo, I just moved these tests into test_screen.py. This will need a rebase with trunk now.
- 322. By Riccardo Padovani
-
Merged from trunk
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:322
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 323. By Riccardo Padovani
-
Removed unused tests
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:323
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Leo Arias (elopio) wrote : | # |
Can you please also remove the workaround we did for bug #1329536 ?
If this works just as with any label, then swipe_to_delete and _drag_pointing_
Nicholas Skaggs (nskaggs) wrote : | # |
What's the status on this? Riccardo I assume we're just waiting for tweaks as requested by Leo?
- 324. By Riccardo Padovani
-
Upgraded an old test removing an hack about labels
Riccardo Padovani (rpadovani) wrote : | # |
I updated the test, but we're waiting for a design review, accordingly to popey
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:324
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 325. By Riccardo Padovani
-
Merged from trunk
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:325
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'Simple/CalcLabel.qml' |
2 | --- Simple/CalcLabel.qml 2014-09-20 10:48:09 +0000 |
3 | +++ Simple/CalcLabel.qml 2014-10-20 15:52:10 +0000 |
4 | @@ -28,8 +28,6 @@ |
5 | property int operationsWidth: operatorLabel.width+formulaLabel.width |
6 | property string operation: "" |
7 | property string numbers: "" |
8 | - property bool labelReadOnly: false |
9 | - property string labelText: "" |
10 | property int numbersHeight: units.gu(4) |
11 | property string numbersColor: '#FEFEFE' |
12 | property bool isLast: false |
13 | @@ -40,56 +38,6 @@ |
14 | width: parent.width |
15 | anchors.left: parent.left |
16 | |
17 | - Item { |
18 | - width: row.width - operatorLabel.width - formulaLabel.width |
19 | - height: parent.height |
20 | - |
21 | - TextField { |
22 | - id: numberName |
23 | - width: parent.width |
24 | - anchors.verticalCenter: parent.verticalCenter |
25 | - // removes ubuntu shape |
26 | - style: TextFieldStyle { |
27 | - background: Item {} |
28 | - } |
29 | - |
30 | - onActiveFocusChanged: { |
31 | - if (numberName.activeFocus) |
32 | - labelVisible = true |
33 | - else |
34 | - labelText = saveCalcLabel(index, labelText); |
35 | - } |
36 | - |
37 | - readOnly: labelReadOnly |
38 | - text: labelText |
39 | - color: "#FEFEFE" |
40 | - onTextChanged: { labelText = numberName.text } |
41 | - hasClearButton: false |
42 | - maximumLength: 12 |
43 | - |
44 | - InverseMouseArea { |
45 | - onClicked: { |
46 | - root.forceActiveFocus(); |
47 | - numberName.focus = false; |
48 | - mouse.accepted = false; |
49 | - labelVisible = false; |
50 | - } |
51 | - anchors.fill: parent; |
52 | - visible: numberName.activeFocus; |
53 | - propagateComposedEvents: true |
54 | - } |
55 | - } |
56 | - |
57 | - Image { |
58 | - visible: labelVisible |
59 | - anchors.bottom: parent.bottom |
60 | - source: Qt.resolvedUrl("images/dot.png") |
61 | - fillMode: Image.Tile |
62 | - width: parent.width - units.gu(0.5) |
63 | - height: units.gu(0.5) |
64 | - } |
65 | - } |
66 | - |
67 | Label { |
68 | id: operatorLabel |
69 | width: units.gu(2) |
70 | @@ -106,7 +54,7 @@ |
71 | property bool isLast: root.isLast |
72 | |
73 | objectName: "formulaLabel" |
74 | - width: parent.width / 1.5 |
75 | + width: parent.width - operatorLabel.width |
76 | color: numbersColor |
77 | anchors.bottom: parent.bottom |
78 | font.pixelSize: numbersHeight |
79 | |
80 | === modified file 'Simple/Memory.qml' |
81 | --- Simple/Memory.qml 2014-09-20 10:48:09 +0000 |
82 | +++ Simple/Memory.qml 2014-10-20 15:52:10 +0000 |
83 | @@ -1,5 +1,5 @@ |
84 | /* |
85 | - * Copyright 2013 Canonical Ltd. |
86 | + * Copyright 2013-2014 Canonical Ltd. |
87 | * |
88 | * This file is part of ubuntu-calculator-app. |
89 | * |
90 | @@ -25,7 +25,6 @@ |
91 | dbId: -1 |
92 | isLastItem: true |
93 | operators: [] |
94 | - mainLabel: '' |
95 | dateText: '' |
96 | } |
97 | } |
98 | |
99 | === modified file 'Simple/Screen.qml' |
100 | --- Simple/Screen.qml 2014-10-09 23:26:40 +0000 |
101 | +++ Simple/Screen.qml 2014-10-20 15:52:10 +0000 |
102 | @@ -27,15 +27,13 @@ |
103 | transformOrigin: Item.Bottom |
104 | |
105 | removable: !isLastItem |
106 | - confirmRemoval: true |
107 | + confirmRemoval: true |
108 | onItemRemoved: root.removeItem() |
109 | showDivider: false |
110 | |
111 | property var ops |
112 | property bool newCalculation: false |
113 | signal useAnswer(string answerToUse, string formulaData) |
114 | - signal labelTextUpdated(int idx, string newText) |
115 | - signal mainLabelUpdated(int idx, string newText) |
116 | signal removeItem() |
117 | |
118 | Item { |
119 | @@ -50,117 +48,11 @@ |
120 | width: parent.width - units.gu(3) |
121 | anchors.centerIn: parent |
122 | |
123 | - //Edit Button icon and time in parent line |
124 | - Item { |
125 | - id: row |
126 | - height: units.gu(4) |
127 | - width: parent.width |
128 | - visible: !isLastItem || newCalculation && formulaView.headerItem.state !== "" |
129 | - Item { |
130 | - id: editIcon |
131 | - objectName: "editIcon" |
132 | - height: parent.height |
133 | - width: units.gu(3) |
134 | - Image { |
135 | - anchors.verticalCenter: parent.verticalCenter |
136 | - source: Qt.resolvedUrl("images/edit.png") |
137 | - } |
138 | - |
139 | - MouseArea { |
140 | - anchors.fill: parent |
141 | - onClicked: { |
142 | - if (labelVisible) { |
143 | - title.focus = false; |
144 | - labelVisible = false; |
145 | - } |
146 | - else { |
147 | - title.focus = true; |
148 | - title.forceActiveFocus(); |
149 | - labelVisible = true |
150 | - } |
151 | - } |
152 | - propagateComposedEvents: true |
153 | - } |
154 | - } |
155 | - Item { |
156 | - width: parent.width / 2 |
157 | - height: parent.height |
158 | - |
159 | - TextField { |
160 | - id: title |
161 | - objectName: "title" |
162 | - width: parent.width |
163 | - anchors.verticalCenter: parent.verticalCenter |
164 | - x: units.gu(3) |
165 | - // removes ubuntu shape |
166 | - style: TextFieldStyle { |
167 | - background: Item {} |
168 | - } |
169 | - text: mainLabel |
170 | - color: "#FEFEFE" |
171 | - onTextChanged: { root.mainLabelUpdated(index, text) } |
172 | - hasClearButton: false |
173 | - font.pixelSize: FontUtils.sizeToPixels("medium") |
174 | - |
175 | - maximumLength: 20; |
176 | - |
177 | - onActiveFocusChanged: { |
178 | - if (title.activeFocus) { |
179 | - labelVisible = true; |
180 | - } |
181 | - else |
182 | - saveMainLabel(mainLabel); |
183 | - } |
184 | - } |
185 | - |
186 | - Image { |
187 | - visible: labelVisible |
188 | - anchors.bottom: parent.bottom |
189 | - x: units.gu(3) |
190 | - source: Qt.resolvedUrl("images/dot.png") |
191 | - fillMode: Image.Tile |
192 | - width: parent.width - units.gu(1.5) |
193 | - height: units.gu(0.5) |
194 | - } |
195 | - } |
196 | - |
197 | - InverseMouseArea { |
198 | - onClicked: { |
199 | - title.focus = false; |
200 | - mouse.accepted = false; |
201 | - labelVisible = false; |
202 | - } |
203 | - anchors.fill: parent; |
204 | - visible: title.activeFocus; |
205 | - propagateComposedEvents: true |
206 | - } |
207 | - |
208 | - Label { |
209 | - id: dateLabel |
210 | - height: parent.height |
211 | - anchors.right: parent.right |
212 | - color: "#9094AA" |
213 | - text: dateText |
214 | - font.capitalization: Font.AllUppercase |
215 | - |
216 | - MouseArea { |
217 | - onClicked: { |
218 | - title.focus = false; |
219 | - mouse.accepted = false; |
220 | - labelVisible = false; |
221 | - } |
222 | - anchors.fill: parent; |
223 | - visible: title.activeFocus; |
224 | - propagateComposedEvents: true |
225 | - } |
226 | - } |
227 | - } |
228 | - |
229 | Repeater{ |
230 | id: repeater |
231 | model: ops |
232 | Column{ |
233 | - width: row.width |
234 | + width: inputs.width |
235 | spacing: units.gu(0.5) |
236 | Rectangle{ |
237 | visible: (_operation == '=') |
238 | @@ -177,16 +69,11 @@ |
239 | CalcLabel { |
240 | objectName: _operation == "=" ? "result" : "operand" + index |
241 | id: formulaLabel |
242 | - labelText: _text |
243 | numbers: _number |
244 | operation: _operation == "=" ? "" : _operation |
245 | numbersHeight: FontUtils.sizeToPixels("x-large") |
246 | isLast: (isLastItem && index === repeater.model.count-1) |
247 | |
248 | - onLabelTextChanged: { |
249 | - root.labelTextUpdated(index, labelText) |
250 | - } |
251 | - |
252 | onNumbersChanged: { |
253 | newCalculation = true |
254 | } |
255 | |
256 | === modified file 'Simple/SimplePage.qml' |
257 | --- Simple/SimplePage.qml 2014-10-09 23:23:13 +0000 |
258 | +++ Simple/SimplePage.qml 2014-10-20 15:52:10 +0000 |
259 | @@ -24,8 +24,6 @@ |
260 | Page { |
261 | property var formula: new F.Formula() |
262 | property var screenFormula: [{_text:'', _operation: '', _number:''}] |
263 | - property bool labelVisible: false |
264 | - property bool saveLabel: true |
265 | property var separator: Qt.locale().decimalPoint |
266 | /* |
267 | * hasToAddDot became true if dot is last pressed button. |
268 | @@ -238,59 +236,45 @@ |
269 | } |
270 | |
271 | Keys.onPressed: { |
272 | - // No label focused |
273 | - if (!labelVisible) { |
274 | - if (event.key === Qt.Key_Escape || event.key === Qt.Key_Delete) { |
275 | - formulaView.atYEnd ? buttonClicked('clear') : formulaView.positionViewAtBeginning(); |
276 | - } else if (event.key === Qt.Key_Backspace) { |
277 | - numeralPop(); |
278 | - } else if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return || event.key === Qt.Key_Equal) { |
279 | - (event.modifiers & Qt.ControlModifier) ? tearedOff() : buttonClicked('='); |
280 | - } else if ((!isNaN(event.text) || |
281 | - event.text === "+" || |
282 | - event.text === "-" || |
283 | - event.text === "*" || |
284 | - event.text === "/" || |
285 | - event.text === "=") && |
286 | - event.text !== "") { |
287 | - buttonClicked(event.text) |
288 | - } else if (event.text === separator) { |
289 | - buttonClicked('.'); |
290 | - } |
291 | - } |
292 | - else { |
293 | - if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return || event.key === Qt.Key_Escape) { |
294 | - if (event.key === Qt.Key_Escape) |
295 | - saveLabel = false; |
296 | - labelVisible = false; |
297 | - // Remove the cursor from the label |
298 | - storage.forceActiveFocus(); |
299 | - } |
300 | + if (event.key === Qt.Key_Escape || event.key === Qt.Key_Delete) { |
301 | + formulaView.atYEnd ? buttonClicked('clear') : formulaView.positionViewAtBeginning(); |
302 | + } else if (event.key === Qt.Key_Backspace) { |
303 | + numeralPop(); |
304 | + } else if (event.key === Qt.Key_Enter || |
305 | + event.key === Qt.Key_Return || |
306 | + event.key === Qt.Key_Equal) { |
307 | + (event.modifiers & Qt.ControlModifier) ? tearedOff() : buttonClicked('='); |
308 | + } else if ((!isNaN(event.text) || |
309 | + event.text === "+" || |
310 | + event.text === "-" || |
311 | + event.text === "*" || |
312 | + event.text === "/" || |
313 | + event.text === "=") && |
314 | + event.text !== "") { |
315 | + buttonClicked(event.text) |
316 | + } else if (event.text === separator) { |
317 | + buttonClicked('.'); |
318 | } |
319 | } |
320 | |
321 | Keys.onReleased: { |
322 | - // No label focused |
323 | - if (!labelVisible) { |
324 | - if (event.key === Qt.Key_Escape || event.key === Qt.Key_Delete) { |
325 | - buttonReleased('clear'); |
326 | - } else if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return || event.key === Qt.Key_Equal) { |
327 | - buttonReleased('='); |
328 | - } else if ((!isNaN(event.text) || |
329 | - event.text === "+" || |
330 | - event.text === "-" || |
331 | - event.text === "*" || |
332 | - event.text === "/" || |
333 | - event.text === "=") && |
334 | - event.text !== "") { |
335 | - buttonReleased(event.text) |
336 | - } else if (event.text === separator) { |
337 | - buttonReleased('.'); |
338 | - } |
339 | + if (event.key === Qt.Key_Escape || event.key === Qt.Key_Delete) { |
340 | + buttonReleased('clear'); |
341 | + } else if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return || event.key === Qt.Key_Equal) { |
342 | + buttonReleased('='); |
343 | + } else if ((!isNaN(event.text) || |
344 | + event.text === "+" || |
345 | + event.text === "-" || |
346 | + event.text === "*" || |
347 | + event.text === "/" || |
348 | + event.text === "=") && |
349 | + event.text !== "") { |
350 | + buttonReleased(event.text) |
351 | + } else if (event.text === separator) { |
352 | + buttonReleased('.'); |
353 | } |
354 | } |
355 | |
356 | - |
357 | property bool __wasAtYBegining: false |
358 | property int __initialContentY: 0 |
359 | property bool __toBeRefresh: false |
360 | @@ -301,28 +285,19 @@ |
361 | function addCurrentToMemory() { |
362 | if (screenFormula[screenFormula.length-1]._operation === '=') { |
363 | var currentDate = new Date(); |
364 | - if (memory.get(0).mainLabel.length === 0) |
365 | - memory.get(0).mainLabel = ''; |
366 | memory.get(0).isLastItem = false |
367 | // TRANSLATORS: this is a time formatting string, |
368 | // see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions |
369 | memory.get(0).dateText = Qt.formatDateTime(currentDate, i18n.tr("dd MMM yy, hh:mm")) |
370 | memory.get(0).timeStamp = currentDate.getTime() |
371 | memory.setProperty(0, "timeStamp", currentDate.getTime()); |
372 | - memory.insert(0,{'dbId': -1, 'dateText': "", 'operators': [{_text:'', _operation:'', _number:''}], 'isLastItem': true, 'mainLabel': ''}); |
373 | + memory.insert(0,{'dbId': -1, 'dateText': "", 'operators': [{_text:'', _operation:'', _number:''}], 'isLastItem': true}); |
374 | positionViewAtBeginning(); |
375 | |
376 | return true; |
377 | } |
378 | } |
379 | |
380 | -// Only for Scientific Calculator |
381 | -// function showError() { |
382 | -// animateError.start() |
383 | -// } |
384 | - |
385 | -// PropertyAnimation {id: animateError; target: formulaView; properties: "color"; from: "#FFA0A0"; to: "#FFFFFF"; duration: 100} |
386 | - |
387 | remove: Transition{ |
388 | NumberAnimation {property: "opacity"; to: 0; duration: 200 } |
389 | } |
390 | @@ -354,7 +329,6 @@ |
391 | |
392 | header: CalcKeyboard { |
393 | id: calcKeyboard |
394 | - visible: !labelVisible |
395 | } |
396 | |
397 | delegate: Screen { |
398 | @@ -364,52 +338,6 @@ |
399 | ops: operators |
400 | |
401 | onUseAnswer: addFromMemory(answerToUse, formulaData) |
402 | - onMainLabelUpdated: { |
403 | - memory.get(index).mainLabel = newText; |
404 | - } |
405 | - |
406 | - onLabelTextUpdated: { |
407 | - if(index === 0){ |
408 | - screenFormula[idx]._text = newText; |
409 | - memory.get(0).operators.get(idx)._text = newText; |
410 | - return; |
411 | - } |
412 | - } |
413 | - |
414 | - function saveMainLabel(newText) { |
415 | - if (index !== 0) { |
416 | - if (saveLabel) { |
417 | - var calculation = []; |
418 | - var calc = storage.getCalculation(memory.get(index).dbId); |
419 | - calc.mainLabel = newText |
420 | - calculation.push({"calc": calc}); |
421 | - storage.updateCalculation(calculation, memory.get(index).dbId); |
422 | - } |
423 | - else { |
424 | - saveLabel = true; |
425 | - var oldLabel = storage.getCalculation(memory.get(index).dbId); |
426 | - memory.get(index).mainLabel = oldLabel.mainLabel; |
427 | - } |
428 | - } |
429 | - } |
430 | - |
431 | - function saveCalcLabel(idx, newText) { |
432 | - if (index !== 0) { |
433 | - if (saveLabel) { |
434 | - var calculation = []; |
435 | - var calc = storage.getCalculation(memory.get(index).dbId); |
436 | - calc.operators[idx]._text = newText; |
437 | - calculation.push({"calc": calc}); |
438 | - storage.updateCalculation(calculation, memory.get(index).dbId); |
439 | - } |
440 | - else { |
441 | - saveLabel = true |
442 | - var oldLabel = storage.getCalculation(memory.get(index).dbId); |
443 | - newText = oldLabel.operators[idx]._text; |
444 | - } |
445 | - } |
446 | - return newText; |
447 | - } |
448 | |
449 | onRemoveItem: { |
450 | storage.removeCalculation(memory.get(index)); |
451 | @@ -469,7 +397,6 @@ |
452 | } |
453 | var newElement = {'dbId': memory.get(1).dbId, |
454 | 'isLastItem': false, |
455 | - 'mainLabel': memory.get(1).mainLabel, |
456 | 'operators': newop}; |
457 | calculations.push({"calc": newElement, "date": memory.get(1).timeStamp}) |
458 | |
459 | |
460 | === removed directory 'Simple/images' |
461 | === removed file 'Simple/images/dot@10.png' |
462 | Binary files Simple/images/dot@10.png 2013-07-03 16:50:54 +0000 and Simple/images/dot@10.png 1970-01-01 00:00:00 +0000 differ |
463 | === removed file 'Simple/images/dot@11.png' |
464 | Binary files Simple/images/dot@11.png 2013-07-03 16:50:54 +0000 and Simple/images/dot@11.png 1970-01-01 00:00:00 +0000 differ |
465 | === removed file 'Simple/images/dot@12.png' |
466 | Binary files Simple/images/dot@12.png 2013-07-03 16:50:54 +0000 and Simple/images/dot@12.png 1970-01-01 00:00:00 +0000 differ |
467 | === removed file 'Simple/images/dot@13.png' |
468 | Binary files Simple/images/dot@13.png 2013-07-03 16:50:54 +0000 and Simple/images/dot@13.png 1970-01-01 00:00:00 +0000 differ |
469 | === removed file 'Simple/images/dot@14.png' |
470 | Binary files Simple/images/dot@14.png 2013-07-03 16:50:54 +0000 and Simple/images/dot@14.png 1970-01-01 00:00:00 +0000 differ |
471 | === removed file 'Simple/images/dot@15.png' |
472 | Binary files Simple/images/dot@15.png 2013-07-03 16:50:54 +0000 and Simple/images/dot@15.png 1970-01-01 00:00:00 +0000 differ |
473 | === removed file 'Simple/images/dot@16.png' |
474 | Binary files Simple/images/dot@16.png 2013-07-03 16:50:54 +0000 and Simple/images/dot@16.png 1970-01-01 00:00:00 +0000 differ |
475 | === removed file 'Simple/images/dot@17.png' |
476 | Binary files Simple/images/dot@17.png 2013-07-03 16:50:54 +0000 and Simple/images/dot@17.png 1970-01-01 00:00:00 +0000 differ |
477 | === removed file 'Simple/images/dot@18.png' |
478 | Binary files Simple/images/dot@18.png 2013-07-03 16:50:54 +0000 and Simple/images/dot@18.png 1970-01-01 00:00:00 +0000 differ |
479 | === removed file 'Simple/images/dot@8.png' |
480 | Binary files Simple/images/dot@8.png 2013-07-03 16:50:54 +0000 and Simple/images/dot@8.png 1970-01-01 00:00:00 +0000 differ |
481 | === removed file 'Simple/images/dot@9.png' |
482 | Binary files Simple/images/dot@9.png 2013-07-03 16:50:54 +0000 and Simple/images/dot@9.png 1970-01-01 00:00:00 +0000 differ |
483 | === removed file 'Simple/images/edit@10.png' |
484 | Binary files Simple/images/edit@10.png 2013-06-14 16:57:35 +0000 and Simple/images/edit@10.png 1970-01-01 00:00:00 +0000 differ |
485 | === removed file 'Simple/images/edit@11.png' |
486 | Binary files Simple/images/edit@11.png 2013-06-14 16:57:35 +0000 and Simple/images/edit@11.png 1970-01-01 00:00:00 +0000 differ |
487 | === removed file 'Simple/images/edit@12.png' |
488 | Binary files Simple/images/edit@12.png 2013-06-14 16:57:35 +0000 and Simple/images/edit@12.png 1970-01-01 00:00:00 +0000 differ |
489 | === removed file 'Simple/images/edit@13.png' |
490 | Binary files Simple/images/edit@13.png 2013-06-14 16:57:35 +0000 and Simple/images/edit@13.png 1970-01-01 00:00:00 +0000 differ |
491 | === removed file 'Simple/images/edit@14.png' |
492 | Binary files Simple/images/edit@14.png 2013-06-14 16:57:35 +0000 and Simple/images/edit@14.png 1970-01-01 00:00:00 +0000 differ |
493 | === removed file 'Simple/images/edit@15.png' |
494 | Binary files Simple/images/edit@15.png 2013-06-14 16:57:35 +0000 and Simple/images/edit@15.png 1970-01-01 00:00:00 +0000 differ |
495 | === removed file 'Simple/images/edit@16.png' |
496 | Binary files Simple/images/edit@16.png 2013-06-14 16:57:35 +0000 and Simple/images/edit@16.png 1970-01-01 00:00:00 +0000 differ |
497 | === removed file 'Simple/images/edit@17.png' |
498 | Binary files Simple/images/edit@17.png 2013-06-14 16:57:35 +0000 and Simple/images/edit@17.png 1970-01-01 00:00:00 +0000 differ |
499 | === removed file 'Simple/images/edit@18.png' |
500 | Binary files Simple/images/edit@18.png 2013-06-14 16:57:35 +0000 and Simple/images/edit@18.png 1970-01-01 00:00:00 +0000 differ |
501 | === removed file 'Simple/images/edit@8.png' |
502 | Binary files Simple/images/edit@8.png 2013-06-14 16:57:35 +0000 and Simple/images/edit@8.png 1970-01-01 00:00:00 +0000 differ |
503 | === removed file 'Simple/images/edit@9.png' |
504 | Binary files Simple/images/edit@9.png 2013-06-14 16:57:35 +0000 and Simple/images/edit@9.png 1970-01-01 00:00:00 +0000 differ |
505 | === removed file 'Simple/images/trash.png' |
506 | Binary files Simple/images/trash.png 2014-02-22 14:01:31 +0000 and Simple/images/trash.png 1970-01-01 00:00:00 +0000 differ |
507 | === removed directory 'images' |
508 | === removed file 'images/dot.svg' |
509 | --- images/dot.svg 2013-07-03 16:50:54 +0000 |
510 | +++ images/dot.svg 1970-01-01 00:00:00 +0000 |
511 | @@ -1,74 +0,0 @@ |
512 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
513 | -<!-- Created with Inkscape (http://www.inkscape.org/) --> |
514 | - |
515 | -<svg |
516 | - xmlns:dc="http://purl.org/dc/elements/1.1/" |
517 | - xmlns:cc="http://creativecommons.org/ns#" |
518 | - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
519 | - xmlns:svg="http://www.w3.org/2000/svg" |
520 | - xmlns="http://www.w3.org/2000/svg" |
521 | - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
522 | - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
523 | - width="8" |
524 | - height="4" |
525 | - id="svg2" |
526 | - version="1.1" |
527 | - inkscape:version="0.48.4 r9939" |
528 | - sodipodi:docname="edit.svg"> |
529 | - <defs |
530 | - id="defs4" /> |
531 | - <sodipodi:namedview |
532 | - id="base" |
533 | - pagecolor="#ffffff" |
534 | - bordercolor="#666666" |
535 | - borderopacity="1.0" |
536 | - inkscape:pageopacity="0.0" |
537 | - inkscape:pageshadow="2" |
538 | - inkscape:zoom="15.839192" |
539 | - inkscape:cx="9.9212783" |
540 | - inkscape:cy="12.769836" |
541 | - inkscape:document-units="px" |
542 | - inkscape:current-layer="layer1" |
543 | - showgrid="true" |
544 | - inkscape:window-width="1293" |
545 | - inkscape:window-height="655" |
546 | - inkscape:window-x="65" |
547 | - inkscape:window-y="24" |
548 | - inkscape:window-maximized="1"> |
549 | - <inkscape:grid |
550 | - type="xygrid" |
551 | - id="grid2985" |
552 | - empspacing="5" |
553 | - visible="true" |
554 | - enabled="true" |
555 | - snapvisiblegridlinesonly="true" /> |
556 | - </sodipodi:namedview> |
557 | - <metadata |
558 | - id="metadata7"> |
559 | - <rdf:RDF> |
560 | - <cc:Work |
561 | - rdf:about=""> |
562 | - <dc:format>image/svg+xml</dc:format> |
563 | - <dc:type |
564 | - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
565 | - <dc:title></dc:title> |
566 | - </cc:Work> |
567 | - </rdf:RDF> |
568 | - </metadata> |
569 | - <g |
570 | - inkscape:label="Layer 1" |
571 | - inkscape:groupmode="layer" |
572 | - id="layer1" |
573 | - transform="translate(0,-1048.3622)"> |
574 | - <path |
575 | - sodipodi:type="arc" |
576 | - style="fill:#b3b3b3;fill-opacity:1;stroke:none" |
577 | - id="path2986" |
578 | - sodipodi:cx="2" |
579 | - sodipodi:cy="2" |
580 | - sodipodi:rx="2" |
581 | - sodipodi:ry="2" |
582 | - d="M 4,2 A 2,2 0 1 1 0,2 2,2 0 1 1 4,2 z" |
583 | - transform="translate(0,1048.3622)" /> |
584 | - </g> |
585 | -</svg> |
586 | |
587 | === removed file 'images/edit.svg' |
588 | --- images/edit.svg 2013-06-14 16:57:35 +0000 |
589 | +++ images/edit.svg 1970-01-01 00:00:00 +0000 |
590 | @@ -1,81 +0,0 @@ |
591 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
592 | -<!-- Created with Inkscape (http://www.inkscape.org/) --> |
593 | - |
594 | -<svg |
595 | - xmlns:dc="http://purl.org/dc/elements/1.1/" |
596 | - xmlns:cc="http://creativecommons.org/ns#" |
597 | - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
598 | - xmlns:svg="http://www.w3.org/2000/svg" |
599 | - xmlns="http://www.w3.org/2000/svg" |
600 | - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
601 | - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
602 | - width="16" |
603 | - height="16" |
604 | - id="svg2" |
605 | - version="1.1" |
606 | - inkscape:version="0.48.4 r9939" |
607 | - sodipodi:docname="New document 1"> |
608 | - <defs |
609 | - id="defs4" /> |
610 | - <sodipodi:namedview |
611 | - id="base" |
612 | - pagecolor="#ffffff" |
613 | - bordercolor="#666666" |
614 | - borderopacity="1.0" |
615 | - inkscape:pageopacity="0.0" |
616 | - inkscape:pageshadow="2" |
617 | - inkscape:zoom="15.839192" |
618 | - inkscape:cx="9.9212783" |
619 | - inkscape:cy="12.769836" |
620 | - inkscape:document-units="px" |
621 | - inkscape:current-layer="layer1" |
622 | - showgrid="true" |
623 | - inkscape:window-width="1301" |
624 | - inkscape:window-height="663" |
625 | - inkscape:window-x="65" |
626 | - inkscape:window-y="24" |
627 | - inkscape:window-maximized="1"> |
628 | - <inkscape:grid |
629 | - type="xygrid" |
630 | - id="grid2985" |
631 | - empspacing="5" |
632 | - visible="true" |
633 | - enabled="true" |
634 | - snapvisiblegridlinesonly="true" /> |
635 | - </sodipodi:namedview> |
636 | - <metadata |
637 | - id="metadata7"> |
638 | - <rdf:RDF> |
639 | - <cc:Work |
640 | - rdf:about=""> |
641 | - <dc:format>image/svg+xml</dc:format> |
642 | - <dc:type |
643 | - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
644 | - <dc:title></dc:title> |
645 | - </cc:Work> |
646 | - </rdf:RDF> |
647 | - </metadata> |
648 | - <g |
649 | - inkscape:label="Layer 1" |
650 | - inkscape:groupmode="layer" |
651 | - id="layer1" |
652 | - transform="translate(0,-1036.3622)"> |
653 | - <g |
654 | - id="g3768" |
655 | - transform="translate(-0.57318655,0.21603727)"> |
656 | - <rect |
657 | - transform="matrix(-0.70710678,0.70710678,-0.70710678,-0.70710678,0,0)" |
658 | - y="-746.38501" |
659 | - x="726.26068" |
660 | - height="4" |
661 | - width="11" |
662 | - id="rect2993" |
663 | - style="fill:#b3b3b3" /> |
664 | - <path |
665 | - inkscape:connector-curvature="0" |
666 | - id="path2995" |
667 | - d="m 6.4518578,1049.0959 -2.8284271,-2.8284 -0.7071068,3.5355 3.5355339,-0.7071 z m -0.4640388,-0.066 -2.8726213,0.5746 0.5745243,-2.8726 2.298097,2.298 z" |
668 | - style="fill:#b3b3b3;fill-opacity:1;stroke:none" /> |
669 | - </g> |
670 | - </g> |
671 | -</svg> |
672 | |
673 | === removed file 'images/generate.py' |
674 | --- images/generate.py 2014-09-08 20:27:07 +0000 |
675 | +++ images/generate.py 1970-01-01 00:00:00 +0000 |
676 | @@ -1,24 +0,0 @@ |
677 | -#!/usr/bin/env python3 |
678 | - |
679 | -import subprocess |
680 | -import os |
681 | - |
682 | - |
683 | -def main(): |
684 | - for idx in range(8, 19): |
685 | - output_name = os.path.join('../Simple/images', 'edit@%d.png' % idx) |
686 | - command = [ |
687 | - 'inkscape', '-f', 'edit.svg', '-e', output_name, '-w', str(idx * 2) |
688 | - ] |
689 | - subprocess.call(command) |
690 | - |
691 | - for idx in range(8, 19): |
692 | - output_name = os.path.join('../Simple/images', 'dot@%d.png' % idx) |
693 | - command = [ |
694 | - 'inkscape', '-f', 'dot.svg', '-e', output_name, '-w', str(idx) |
695 | - ] |
696 | - subprocess.call(command) |
697 | - |
698 | - |
699 | -if __name__ == '__main__': |
700 | - main() |
701 | |
702 | === modified file 'tests/autopilot/ubuntu_calculator_app/__init__.py' |
703 | --- tests/autopilot/ubuntu_calculator_app/__init__.py 2014-10-10 03:05:17 +0000 |
704 | +++ tests/autopilot/ubuntu_calculator_app/__init__.py 2014-10-20 15:52:10 +0000 |
705 | @@ -324,17 +324,9 @@ |
706 | @autopilot.logging.log_action(logger.info) |
707 | def swipe_to_delete(self): |
708 | """Swipe the screen to delete the calculation.""" |
709 | - # We override it because the left side of the screen is used to |
710 | - # add labels, so the swipe has to start where the operation starts. |
711 | - # This is hard for a user to do, and weird for automation, which means |
712 | - # it's an usability issue. See http://pad.lv/1329536 |
713 | - self._drag_pointing_device_to_delete() |
714 | + x, y, w, h = self.globalRect |
715 | + tx = x + (w / 5) |
716 | + ty = y + (h / 2) |
717 | + self.pointing_device.drag(tx, ty, x + w, ty) |
718 | + |
719 | self.waitingConfirmationForRemoval.wait_for(True) |
720 | - |
721 | - def _drag_pointing_device_to_delete(self): |
722 | - x, y, width, height = self.globalRect |
723 | - start_x = x + (width * 0.33) |
724 | - stop_x = x + (width * 0.9) |
725 | - start_y = stop_y = y + (height // 2) |
726 | - |
727 | - self.pointing_device.drag(start_x, start_y, stop_x, stop_y) |
728 | |
729 | === modified file 'tests/autopilot/ubuntu_calculator_app/tests/test_screen.py' |
730 | --- tests/autopilot/ubuntu_calculator_app/tests/test_screen.py 2014-09-05 21:06:27 +0000 |
731 | +++ tests/autopilot/ubuntu_calculator_app/tests/test_screen.py 2014-10-20 15:52:10 +0000 |
732 | @@ -41,51 +41,3 @@ |
733 | result_label = screen.get_result_label() |
734 | |
735 | self.assertThat(result_label, Equals(None)) |
736 | - |
737 | - def test_unfocus_label(self): |
738 | - """ Clear label focus by clicking outside its area. """ |
739 | - self.app.main_view.calculate_operation("12+3") |
740 | - self._assert_result("15") |
741 | - |
742 | - # Focus the item |
743 | - screen = self.app.main_view.get_current_screen() |
744 | - screen.click_title_label() |
745 | - title_label = screen.get_title_label() |
746 | - self.assertThat(title_label.activeFocus, Eventually(Equals(True))) |
747 | - |
748 | - # Click elsewhere to unfocus the label |
749 | - self.app.pointing_device.click_object(screen) |
750 | - self.assertThat(title_label.activeFocus, Eventually(Equals(False))) |
751 | - |
752 | - def test_edit_mode(self): |
753 | - """ Enter and exit edit mode clicking on pencil icon """ |
754 | - self.app.main_view.calculate_operation("105-5") |
755 | - self._assert_result("100") |
756 | - |
757 | - # Click the edit button |
758 | - screen = self.app.main_view.get_current_screen() |
759 | - screen.click_edit_icon() |
760 | - |
761 | - # Check if is focused |
762 | - title_label = screen.get_title_label() |
763 | - self.assertThat(title_label.activeFocus, Eventually(Equals(True))) |
764 | - |
765 | - # Click to unfocus the label |
766 | - screen.click_edit_icon() |
767 | - self.assertThat(title_label.activeFocus, Eventually(Equals(False))) |
768 | - |
769 | - def test_hide_calc_keyboard(self): |
770 | - """ Hide calc keyboard when focus on a label """ |
771 | - self.app.main_view.calculate_operation("18-1") |
772 | - self._assert_result("17") |
773 | - |
774 | - # Focus the item |
775 | - screen = self.app.main_view.get_current_screen() |
776 | - screen.click_title_label() |
777 | - |
778 | - calc_keyboard = self.app.main_view.get_calc_keyboard() |
779 | - self.assertThat(calc_keyboard.visible, Eventually(Equals(False))) |
780 | - |
781 | - # Click elsewhere to unfocus the label |
782 | - self.app.pointing_device.click_object(screen) |
783 | - self.assertThat(calc_keyboard.visible, Eventually(Equals(True))) |
Not sure about the width of the numbers with the sign over on the far left. I think we should make sure this passes CI then build a click for the design team to review.