@@ -151,43 +151,39 @@ Item {
151151 }
152152 }
153153
154− delegate: Previews.Preview {
155− id: preview
156− objectName: "preview" + index
154+ delegate: Item {
157155 height: previewListView.height
158156 width: previewListView.width
159157
160− isCurrent: ListView.isCurrentItem
161−
162− onPreviewModelChanged: preview.opacity = 0;
163− onReadyChanged: if (ready) fadeIn.start()
164− previewModel: {
165− // TODO
166− // We need the isCurrent because the scope fails to
167− // deliver the preview if we ask for one after other very quickly
168− // If we remove the isCurrent, we will have to think another way of
169− // doing the fadeIn or just don't do it at all or just decide
170− // this code is good enough and remove the TODO
171− if (isCurrent) {
158+ Previews.Preview {
159+ id: preview
160+ objectName: "preview" + index
161+ anchors.fill: parent
162+
163+ isCurrent: parent.ListView.isCurrentItem
164+
165+ previewModel: {
172166 var previewStack = root.scope.preview(result);
173167 return previewStack.get(0);
174− } else {
175− ready = false;
176− return null;
177168 }
169+
170+ // onClose: {
171+ // previewListView.open = false
172+ // }
173+
178174 }
179175
180−// onClose: {
181−// previewListView.open = false
182−// }
183−
184− PropertyAnimation {
185− id: fadeIn
186− target: preview
187− property: "opacity"
188− from: 0.0
189− to: 1.0
190− duration: UbuntuAnimation.BriskDuration
176+ MouseArea {
177+ id: processingMouseArea
178+ objectName: "processingMouseArea"
179+ anchors.fill: parent
180+ enabled: !preview.previewModel.loaded || preview.previewModel.processingAction
181+
182+ ActivityIndicator {
183+ anchors.centerIn: parent
184+ visible: parent.enabled
185+ running: visible
186+ }
191187 }
192188 }
193189 }