@@ -67,9 +67,9 @@ PreviewWidget {
67 anchors.fill: parent
67 anchors.fill: parent
68 onClicked: {
68 onClicked: {
69 slideShowListView.currentIndex = index;
69 slideShowListView.currentIndex = index;
70− slideShow.initialX = rootItem.mapFromItem(parent, 0, 0).x
70+ slideShow.initialX = rootItem.mapFromItem(parent, 0, 0).x;
71− slideShow.initialY = rootItem.mapFromItem(parent, 0, 0).y
71+ slideShow.initialY = rootItem.mapFromItem(parent, 0, 0).y;
72− slideShow.visible = true;
72+ slideShow.open();
@@ -83,13 +83,15 @@ PreviewWidget {
83 readonly property real scaleProgress: (scale - initialScale) / (1.0 - initialScale)
83 readonly property real scaleProgress: (scale - initialScale) / (1.0 - initialScale)
84 property real initialX: 0
84 property real initialX: 0
85 property real initialY: 0
85 property real initialY: 0
86+ property bool opened: false
87+ property bool opening: false
87 parent: rootItem
89 parent: rootItem
88 width: parent.width
90 width: parent.width
89 height: parent.height
91 height: parent.height
90− visible: false
92+ visible: scale > initialScale
91 clip: visible && scale < 1.0
93 clip: visible && scale < 1.0
92− scale: visible ? 1.0 : initialScale
94+ scale: opened ? 1.0 : initialScale
93 transformOrigin: Item.TopLeft
95 transformOrigin: Item.TopLeft
94 transform: Translate {
96 transform: Translate {
95 x: slideShow.initialX - slideShow.initialX * slideShow.scaleProgress
97 x: slideShow.initialX - slideShow.initialX * slideShow.scaleProgress
@@ -98,9 +100,21 @@ PreviewWidget {
98 color: "black"
100 color: "black"
99 radius: units.gu(1) - units.gu(1) * slideShow.scaleProgress
101 radius: units.gu(1) - units.gu(1) * slideShow.scaleProgress
101 Behavior on scale {
113 Behavior on scale {
102− enabled: !slideShow.visible
114+ UbuntuNumberAnimation {
115+ duration: slideShow.opening ? UbuntuAnimation.FastDuration :
103− UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration }
116+ UbuntuAnimation.FastDuration / 3
106 Flickables.ListView {
120 Flickables.ListView {
@@ -160,7 +174,7 @@ PreviewWidget {
160 width: units.gu(8)
174 width: units.gu(8)
161 height: width
175 height: width
163− onClicked: slideShow.visible = false
177+ onClicked: slideShow.close()
165 Rectangle {
179 Rectangle {
166 anchors.fill: parent
180 anchors.fill: parent