Merge lp:~fboucault/camera-app/startup_black_flash_fix into lp:camera-app

Proposed by Florian Boucault
Status: Merged
Approved by: Bill Filler
Approved revision: 581
Merged at revision: 581
Proposed branch: lp:~fboucault/camera-app/startup_black_flash_fix
Merge into: lp:camera-app
Diff against target: 48 lines (+13/-3)
3 files modified
ViewFinderOverlay.qml (+11/-1)
tests/autopilot/camera_app/tests/test_capture.py (+1/-1)
tests/autopilot/camera_app/tests/test_focus.py (+1/-1)
To merge this branch: bzr merge lp:~fboucault/camera-app/startup_black_flash_fix
Reviewer Review Type Date Requested Status
Bill Filler (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+273289@code.launchpad.net

Commit message

Fix viewfinder short disappearance at startup.
Make overlay controls appear slightly faster at startup.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

tested, works

review: Approve
582. By Florian Boucault

Fix Python syntax errors E265 in autopilot tests.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ViewFinderOverlay.qml'
2--- ViewFinderOverlay.qml 2015-07-03 18:21:34 +0000
3+++ ViewFinderOverlay.qml 2015-10-05 13:14:34 +0000
4@@ -185,7 +185,17 @@
5 }
6 }
7
8- property real progress: (bottomEdge.height - bottomEdge.position) / bottomEdge.height
9+ /* At startup, opened is false and 'bottomEdge.height' is 0 until
10+ optionsOverlayLoader has finished loading. When that happens
11+ 'bottomEdge.height' becomes non 0 and 'bottomEdge.position' which
12+ depends on bottomEdge.height eventually reaches the value
13+ 'bottomEdge.height'. Unfortunately during that short period 'progress'
14+ has an incorrect value and unfortunate consequences/bugs occur.
15+ That makes it important to only compute progress when 'opened' is true.
16+
17+ Ref.: https://bugs.launchpad.net/ubuntu/+source/camera-app/+bug/1472903
18+ */
19+ property real progress: opened ? (bottomEdge.height - bottomEdge.position) / bottomEdge.height : 0
20 property list<ListModel> options: [
21 ListModel {
22 id: gpsOptionsModel
23
24=== modified file 'tests/autopilot/camera_app/tests/test_capture.py'
25--- tests/autopilot/camera_app/tests/test_capture.py 2015-04-29 15:56:44 +0000
26+++ tests/autopilot/camera_app/tests/test_capture.py 2015-10-05 13:14:34 +0000
27@@ -159,7 +159,7 @@
28 self.pointing_device.click()
29
30 # Check that the photo roll hint is displayed
31- #self.assertEquals(hint.visible, True)
32+ # self.assertEquals(hint.visible, True)
33 self.assertThat(hint.visible, Eventually(Equals(True)))
34
35 # Swipe to photo roll
36
37=== modified file 'tests/autopilot/camera_app/tests/test_focus.py'
38--- tests/autopilot/camera_app/tests/test_focus.py 2015-04-29 15:56:44 +0000
39+++ tests/autopilot/camera_app/tests/test_focus.py 2015-10-05 13:14:34 +0000
40@@ -96,7 +96,7 @@
41
42 # Check if there's a gap between the viewfinder feed and the zoom
43 # control. If there is, test that focusing there won't show the focus
44- #ring.
45+ # ring.
46 if zoom.y > feed.height: # Feed is aligned to the top of the window
47 x, y, h, w = zoom.globalRect
48 click_coords = [x + (h // 2), y - 2]

Subscribers

People subscribed via source and target branches