Updated copyright year
[harmattan/cameraplus] / qml / PreviewImage.qml
index 89cc63a..dbc5c89 100644 (file)
@@ -3,7 +3,7 @@
 /*!
  * This file is part of CameraPlus.
  *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -28,11 +28,19 @@ Image {
         id: image
         anchors.fill: parent
         property alias animationRunning: animation.running
+        opacity: visible ? 1 : 0
+        z: 1
+
+        visible: opacity != 0
 
-        visible: false
         cache: false
         fillMode: Image.PreserveAspectFit
 
+        MouseArea {
+                anchors.fill: parent
+                enabled: parent.visible
+        }
+
         SequentialAnimation {
                 id: animation
                 PauseAnimation { duration: 500; alwaysRunToEnd: true }
@@ -40,8 +48,8 @@ Image {
         }
 
         function setPreview(preview) {
-                animation.start();
                 image.source = preview;
-                image.visible = true;
+                image.opacity = 1;
+                animation.start();
         }
 }