projects
/
harmattan
/
cameraplus
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4c3b898
)
Reworked preview animation
author
Mohammed Sameer
<msameer@foolab.org>
Sun, 15 Sep 2013 00:58:11 +0000
(
03:58
+0300)
committer
Mohammed Sameer
<msameer@foolab.org>
Sun, 15 Sep 2013 00:58:11 +0000
(
03:58
+0300)
qml/PreviewImage.qml
patch
|
blob
|
history
diff --git
a/qml/PreviewImage.qml
b/qml/PreviewImage.qml
index
e3f7880
..
31d6234
100644
(file)
--- a/
qml/PreviewImage.qml
+++ b/
qml/PreviewImage.qml
@@
-25,11
+25,12
@@
import QtCamera 1.0
Image {
id: image
Image {
id: image
- anchors.fill: parent
+ x: 0
+ y: 0
+ width: parent.width
+ height: parent.height
property alias animationRunning: animation.running
property alias animationRunning: animation.running
- visible: opacity != 0
-
cache: false
fillMode: Image.PreserveAspectFit
cache: false
fillMode: Image.PreserveAspectFit
@@
-40,16
+41,24
@@
Image {
SequentialAnimation {
id: animation
SequentialAnimation {
id: animation
+
+ onRunningChanged: {
+ if (!running) {
+ image.visible = false
+ image.x = 0
+ }
+ }
+
PauseAnimation {
PauseAnimation {
- duration:
50
0
+ duration:
25
0
alwaysRunToEnd: true
}
NumberAnimation {
alwaysRunToEnd: true
}
NumberAnimation {
- target:
preview
- property: "
opacity
"
- from:
1
- to:
0
+ target:
image
+ property: "
x
"
+ from:
0
+ to:
parent.width
duration: 250
alwaysRunToEnd: true
}
duration: 250
alwaysRunToEnd: true
}
@@
-57,7
+66,8
@@
Image {
function setPreview(preview) {
image.source = preview
function setPreview(preview) {
image.source = preview
- image.opacity = 1
+ image.x = 0
+ image.visible = true
animation.start()
}
}
animation.start()
}
}