From 862f234624baae20acbcb11f85c1082180c406bd Mon Sep 17 00:00:00 2001 From: Mohammed Sameer Date: Fri, 2 Aug 2013 17:33:53 +0300 Subject: [PATCH] Hide post capture toolbar immediately when we start video playback --- qml/PostCaptureView.qml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/qml/PostCaptureView.qml b/qml/PostCaptureView.qml index b3d6062..b0bf1d6 100644 --- a/qml/PostCaptureView.qml +++ b/qml/PostCaptureView.qml @@ -25,7 +25,6 @@ import CameraPlus 1.0 import QtCamera 1.0 // TODO: qrc:/qml/PostCaptureView.qml:104:5: QML CameraToolBar: Binding loop detected for property "height" -// TODO: hide toolbar as soon as we start playback Item { id: postCaptureView @@ -36,6 +35,15 @@ Item { CameraResources.Image property bool available: view.currentItem ? view.currentItem.itemData.available : false + Connections { + target: view.currentItem + onPlayingChanged: { + if (view.currentItem.playing) { + hideTimer.running = false + } + } + } + ShareHelper { id: share settings: platformSettings @@ -120,7 +128,7 @@ Item { (view.currentItem && view.currentItem.error) && !view.currentItem.playing Behavior on anchors.bottomMargin { - PropertyAnimation { duration: 200; } + PropertyAnimation { duration: view.currentItem && view.currentItem.playing ? 0 : 200 } } tools: CameraToolBarTools { @@ -212,7 +220,7 @@ Item { radius: toolBar.radius Behavior on anchors.topMargin { - PropertyAnimation { duration: 200; } + PropertyAnimation { duration: view.currentItem && view.currentItem.playing ? 0 : 200 } } Flow { -- 2.25.1