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

Proposed by Florian Boucault
Status: Superseded
Proposed branch: lp:~fboucault/camera-app/convergence_fullscreen
Merge into: lp:camera-app
Diff against target: 204 lines (+46/-16)
7 files modified
GalleryView.qml (+2/-0)
PhotogridView.qml (+1/-1)
SlideshowView.qml (+3/-5)
ViewFinderOverlay.qml (+3/-3)
ViewFinderOverlayLoader.qml (+3/-1)
ViewFinderView.qml (+2/-1)
camera-app.qml (+32/-5)
To merge this branch: bzr merge lp:~fboucault/camera-app/convergence_fullscreen
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+286340@code.launchpad.net

This proposal has been superseded by a proposal from 2016-03-11.

Commit message

Only use full screen in staged mode.

Description of the change

Only use full screen in staged mode.

To post a comment you must log in.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'GalleryView.qml'
--- GalleryView.qml 2015-11-26 11:29:18 +0000
+++ GalleryView.qml 2016-02-17 15:35:50 +0000
@@ -76,6 +76,7 @@
76 model: galleryView.model76 model: galleryView.model
77 visible: opacity != 0.077 visible: opacity != 0.0
78 inView: galleryView.inView && galleryView.currentView == slideshowView78 inView: galleryView.inView && galleryView.currentView == slideshowView
79 focus: inView
79 inSelectionMode: main.contentExportMode || galleryView.userSelectionMode80 inSelectionMode: main.contentExportMode || galleryView.userSelectionMode
80 onToggleSelection: model.toggleSelected(currentIndex)81 onToggleSelection: model.toggleSelected(currentIndex)
81 onToggleHeader: header.toggle();82 onToggleHeader: header.toggle();
@@ -89,6 +90,7 @@
89 model: galleryView.model90 model: galleryView.model
90 visible: opacity != 0.091 visible: opacity != 0.0
91 inView: galleryView.inView && galleryView.currentView == photogridView92 inView: galleryView.inView && galleryView.currentView == photogridView
93 focus: inView
92 inSelectionMode: main.contentExportMode || galleryView.userSelectionMode94 inSelectionMode: main.contentExportMode || galleryView.userSelectionMode
93 onPhotoClicked: {95 onPhotoClicked: {
94 slideshowView.showPhotoAtIndex(index);96 slideshowView.showPhotoAtIndex(index);
9597
=== modified file 'PhotogridView.qml'
--- PhotogridView.qml 2015-11-26 13:45:38 +0000
+++ PhotogridView.qml 2016-02-17 15:35:50 +0000
@@ -22,7 +22,7 @@
22import CameraApp 0.122import CameraApp 0.1
23import "MimeTypeMapper.js" as MimeTypeMapper23import "MimeTypeMapper.js" as MimeTypeMapper
2424
25Item {25FocusScope {
26 id: photogridView26 id: photogridView
2727
28 property var model28 property var model
2929
=== modified file 'SlideshowView.qml'
--- SlideshowView.qml 2015-12-07 15:04:12 +0000
+++ SlideshowView.qml 2016-02-17 15:35:50 +0000
@@ -23,7 +23,7 @@
23import CameraApp 0.123import CameraApp 0.1
24import "MimeTypeMapper.js" as MimeTypeMapper24import "MimeTypeMapper.js" as MimeTypeMapper
2525
26Item {26FocusScope {
27 id: slideshowView27 id: slideshowView
2828
29 property var model29 property var model
@@ -111,14 +111,12 @@
111111
112 anchors.fill: parent112 anchors.fill: parent
113 model: slideshowView.model113 model: slideshowView.model
114 focus: true
114 orientation: ListView.Horizontal115 orientation: ListView.Horizontal
115 boundsBehavior: Flickable.StopAtBounds116 boundsBehavior: Flickable.StopAtBounds
116 cacheBuffer: width117 cacheBuffer: width
117 highlightRangeMode: ListView.StrictlyEnforceRange118 highlightRangeMode: ListView.StrictlyEnforceRange
118 // FIXME: this disables the animation introduced by highlightRangeMode119 highlightMoveDuration: UbuntuAnimation.FastDuration
119 // happening setting currentIndex; it is necessary at least because we
120 // were hitting https://bugreports.qt-project.org/browse/QTBUG-41035
121 highlightMoveDuration: 0
122 snapMode: ListView.SnapOneItem120 snapMode: ListView.SnapOneItem
123 onCountChanged: {121 onCountChanged: {
124 // currentIndex is -1 by default and stays so until manually set to something else122 // currentIndex is -1 by default and stays so until manually set to something else
125123
=== modified file 'ViewFinderOverlay.qml'
--- ViewFinderOverlay.qml 2016-01-11 15:07:58 +0000
+++ ViewFinderOverlay.qml 2016-02-17 15:35:50 +0000
@@ -32,6 +32,7 @@
32 property real revealProgress: noSpaceHint.visible ? 1.0 : bottomEdge.progress32 property real revealProgress: noSpaceHint.visible ? 1.0 : bottomEdge.progress
33 property var controls: controls33 property var controls: controls
34 property var settings: settings34 property var settings: settings
35 property int sensorOrientation
3536
36 function showFocusRing(x, y) {37 function showFocusRing(x, y) {
37 focusRing.center = Qt.point(x, y);38 focusRing.center = Qt.point(x, y);
@@ -663,9 +664,8 @@
663 break;664 break;
664 }665 }
665666
666 if (Screen.primaryOrientation == Qt.PortraitOrientation) {667 // account for the orientation of the sensor
667 orientation += 90;668 orientation -= viewFinderOverlay.sensorOrientation;
668 }
669669
670 if (camera.captureMode == Camera.CaptureVideo) {670 if (camera.captureMode == Camera.CaptureVideo) {
671 if (main.contentExportMode) {671 if (main.contentExportMode) {
672672
=== modified file 'ViewFinderOverlayLoader.qml'
--- ViewFinderOverlayLoader.qml 2016-01-07 08:03:57 +0000
+++ ViewFinderOverlayLoader.qml 2016-02-17 15:35:50 +0000
@@ -24,6 +24,7 @@
24 property real revealProgress: loader.item ? loader.item.revealProgress : 024 property real revealProgress: loader.item ? loader.item.revealProgress : 0
25 property var controls: loader.item ? loader.item.controls : null25 property var controls: loader.item ? loader.item.controls : null
26 property var settings: loader.item.settings26 property var settings: loader.item.settings
27 property int sensorOrientation
2728
28 function showFocusRing(x, y) {29 function showFocusRing(x, y) {
29 loader.item.showFocusRing(x, y);30 loader.item.showFocusRing(x, y);
@@ -35,6 +36,7 @@
3536
36 asynchronous: true37 asynchronous: true
37 Component.onCompleted: {38 Component.onCompleted: {
38 loader.setSource("ViewFinderOverlay.qml", { "camera": loader.camera });39 loader.setSource("ViewFinderOverlay.qml", { "camera": loader.camera,
40 "sensorOrientation": Qt.binding(function () {return loader.sensorOrientation})});
39 }41 }
40}42}
4143
=== modified file 'ViewFinderView.qml'
--- ViewFinderView.qml 2016-01-14 15:55:52 +0000
+++ ViewFinderView.qml 2016-02-17 15:35:50 +0000
@@ -22,7 +22,7 @@
22import QtGraphicalEffects 1.022import QtGraphicalEffects 1.0
23import Ubuntu.Content 0.123import Ubuntu.Content 0.1
2424
25Item {25FocusScope {
26 id: viewFinderView26 id: viewFinderView
2727
28 property bool overlayVisible: true28 property bool overlayVisible: true
@@ -252,6 +252,7 @@
252 // Set orientation only at startup because later on Screen.primaryOrientation252 // Set orientation only at startup because later on Screen.primaryOrientation
253 // may change.253 // may change.
254 orientation = Screen.primaryOrientation === Qt.PortraitOrientation ? -90 : 0;254 orientation = Screen.primaryOrientation === Qt.PortraitOrientation ? -90 : 0;
255 viewFinderOverlay.sensorOrientation = orientation;
255 }256 }
256257
257 /* Convenience item tracking the real position and size of the real video feed.258 /* Convenience item tracking the real position and size of the real video feed.
258259
=== modified file 'camera-app.qml'
--- camera-app.qml 2016-01-07 08:03:57 +0000
+++ camera-app.qml 2016-02-17 15:35:50 +0000
@@ -30,6 +30,26 @@
30 height: units.gu(80)30 height: units.gu(80)
31 color: "black"31 color: "black"
32 title: "Camera"32 title: "Camera"
33 // special flag only supported by Unity8/MIR so far that hides the shell's
34 // top panel in Staged mode
35 flags: Qt.Window | 0x00800000
36
37 property int preFullScreenVisibility
38
39 function toggleFullScreen() {
40 if (main.visibility != Window.FullScreen) {
41 preFullScreenVisibility = main.visibility;
42 main.visibility = Window.FullScreen;
43 } else {
44 main.visibility = preFullScreenVisibility;
45 }
46 }
47
48 function exitFullScreen() {
49 if (main.visibility == Window.FullScreen) {
50 main.visibility = preFullScreenVisibility;
51 }
52 }
3353
34 UnityActions.ActionManager {54 UnityActions.ActionManager {
35 actions: [55 actions: [
@@ -63,11 +83,7 @@
6383
64 Component.onCompleted: {84 Component.onCompleted: {
65 i18n.domain = "camera-app";85 i18n.domain = "camera-app";
66 if (!application.desktopMode) {86 main.show();
67 main.showFullScreen();
68 } else {
69 main.show();
70 }
71 }87 }
7288
7389
@@ -78,6 +94,15 @@
78 flickableDirection: state == "PORTRAIT" ? Flickable.HorizontalFlick : Flickable.VerticalFlick94 flickableDirection: state == "PORTRAIT" ? Flickable.HorizontalFlick : Flickable.VerticalFlick
79 boundsBehavior: Flickable.StopAtBounds95 boundsBehavior: Flickable.StopAtBounds
8096
97 Keys.onPressed: {
98 if (event.key == Qt.Key_F11) {
99 main.toggleFullScreen();
100 event.accepted = true;
101 }
102 }
103 Keys.onEscapePressed: main.exitFullScreen()
104
105
81 property real panesMargin: units.gu(1)106 property real panesMargin: units.gu(1)
82 property real ratio107 property real ratio
83 property int orientationAngle: Screen.angleBetween(Screen.primaryOrientation, Screen.orientation)108 property int orientationAngle: Screen.angleBetween(Screen.primaryOrientation, Screen.orientation)
@@ -256,6 +281,7 @@
256 height: viewSwitcher.height281 height: viewSwitcher.height
257 overlayVisible: !viewSwitcher.moving && !viewSwitcher.flicking282 overlayVisible: !viewSwitcher.moving && !viewSwitcher.flicking
258 inView: viewSwitcher.ratio < 0.5283 inView: viewSwitcher.ratio < 0.5
284 focus: !galleryView.focus
259 opacity: inView ? 1.0 : 0.0285 opacity: inView ? 1.0 : 0.0
260 onPhotoTaken: {286 onPhotoTaken: {
261 galleryView.prependMediaToModel(filePath);287 galleryView.prependMediaToModel(filePath);
@@ -273,6 +299,7 @@
273 width: viewSwitcher.width299 width: viewSwitcher.width
274 height: viewSwitcher.height300 height: viewSwitcher.height
275 inView: viewSwitcher.ratio > 0.0301 inView: viewSwitcher.ratio > 0.0
302 focus: inView
276 onExit: viewSwitcher.switchToViewFinder()303 onExit: viewSwitcher.switchToViewFinder()
277 opacity: inView ? 1.0 : 0.0304 opacity: inView ? 1.0 : 0.0
278 }305 }

Subscribers

People subscribed via source and target branches