X-Git-Url: http://cgit.sxemacs.org/?p=harmattan%2Fcameraplus;a=blobdiff_plain;f=qml%2FPostCaptureItem.qml;h=cc0e2f9cec3a96585a98ec89000a2a4faea72dfe;hp=b2911fe67e1d103eca3eb286e50a7e48f8574f12;hb=9fda7f8b0e9a317b0ab90463f1d0a163abc7e319;hpb=9299fa292ded077de6e80532f3cfc79c523d7d8f diff --git a/qml/PostCaptureItem.qml b/qml/PostCaptureItem.qml index b2911fe..cc0e2f9 100644 --- a/qml/PostCaptureItem.qml +++ b/qml/PostCaptureItem.qml @@ -20,11 +20,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -@IMPORT_QT_QUICK@ +import QtQuick 2.0 import CameraPlus 1.0 Item { id: postCaptureItem + property bool isVideo: itemData.type.search("nmm#Video") > 0 property alias error: image.error property variant itemData: item @@ -57,23 +58,16 @@ Item { } // TODO: rotation - QuillItem { + FullScreenThumbnail { id: image + source: itemData.url + mimeType: itemData.mimeType + width: parent.width - 10 height: parent.height anchors.centerIn: parent - Component.onCompleted: initialize(itemData.url, itemData.mimetype) visible: loader.source == "" - CameraLabel { - anchors.fill: parent - visible: image.error - text: qsTr("Failed to load preview") - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - font.pixelSize: 32 - } - MouseArea { id: mouse anchors.fill: parent @@ -81,13 +75,27 @@ Item { onClicked: postCaptureItem.clicked() } - CameraToolIcon { - // TODO: this is overlapping with error. - id: playIcon + Column { anchors.centerIn: parent - iconSource: "image://theme/icon-s-music-video-play" - visible: isVideo - onClicked: startPlayback() + width: parent.width + + CameraLabel { + id: errorLabel + width: parent.width + visible: image.error + text: qsTr("Failed to load preview") + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + font.pixelSize: 32 + } + + CameraToolIcon { + id: playIcon + anchors.horizontalCenter: parent.horizontalCenter + iconId: "icon-m-toolbar-mediacontrol-play-white" + visible: isVideo + onClicked: startPlayback() + } } } }