Merge lp:~schwann/gallery-app/gallery-close-toolbar-on-edit into lp:gallery-app

Proposed by Günter Schwann
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 795
Merged at revision: 795
Proposed branch: lp:~schwann/gallery-app/gallery-close-toolbar-on-edit
Merge into: lp:gallery-app
Diff against target: 83 lines (+14/-0)
2 files modified
rc/qml/MediaViewer/EditPopover.qml (+10/-0)
rc/qml/MediaViewer/MediaViewer.qml (+4/-0)
To merge this branch: bzr merge lp:~schwann/gallery-app/gallery-close-toolbar-on-edit
Reviewer Review Type Date Requested Status
Olivier Tilloy Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+178961@code.launchpad.net

Commit message

Close the toolbar when an editing operation was selected

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Olivier Tilloy (osomon) wrote :

Works well.

It would be nice(r) to somehow manage to connect to the hide() function which is already called for all actions, but this solution works.

On a related note, You should probably replace the EditPopover component with the standard ActionSelectionPopover component from the UITK (http://developer.ubuntu.com/api/devel/ubuntu-13.10/qml/ui-toolkit/qml-ubuntu-components-popups0-actionselectionpopover.html).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'rc/qml/MediaViewer/EditPopover.qml'
2--- rc/qml/MediaViewer/EditPopover.qml 2013-06-13 12:13:00 +0000
3+++ rc/qml/MediaViewer/EditPopover.qml 2013-08-07 12:50:00 +0000
4@@ -21,6 +21,7 @@
5 /*!
6 */
7 Popover {
8+ id: root
9 /*!
10 */
11 property variant photo: null
12@@ -28,6 +29,9 @@
13 */
14 property CropInteractor cropper
15
16+ ///
17+ signal buttonPressed()
18+
19 Column {
20 anchors {
21 left: parent.left
22@@ -40,6 +44,7 @@
23 onClicked: {
24 hide();
25 photo.rotateRight();
26+ root.buttonPressed();
27 }
28 }
29 ListItem.Standard {
30@@ -48,6 +53,7 @@
31 onClicked: {
32 hide();
33 cropper.show(photo);
34+ root.buttonPressed();
35 }
36 }
37 ListItem.Standard {
38@@ -56,6 +62,7 @@
39 onClicked: {
40 hide();
41 photo.autoEnhance();
42+ root.buttonPressed();
43 }
44 }
45 ListItem.Standard {
46@@ -65,6 +72,7 @@
47 onClicked: {
48 hide();
49 photo.undo();
50+ root.buttonPressed();
51 }
52 }
53 ListItem.Standard {
54@@ -74,6 +82,7 @@
55 onClicked: {
56 hide();
57 photo.redo();
58+ root.buttonPressed();
59 }
60 }
61 ListItem.Standard {
62@@ -83,6 +92,7 @@
63 onClicked: {
64 hide();
65 photo.revertToOriginal();
66+ root.buttonPressed();
67 }
68 }
69 }
70
71=== modified file 'rc/qml/MediaViewer/MediaViewer.qml'
72--- rc/qml/MediaViewer/MediaViewer.qml 2013-07-17 15:11:51 +0000
73+++ rc/qml/MediaViewer/MediaViewer.qml 2013-08-07 12:50:00 +0000
74@@ -239,6 +239,10 @@
75 visible: false
76 photo: galleryPhotoViewer.media
77 cropper: viewerWrapper.cropper
78+
79+ onButtonPressed: {
80+ viewerWrapper.tools.opened = false;
81+ }
82 }
83 }
84

Subscribers

People subscribed via source and target branches