From c5ecf23d0f96976948626ba51275419067fdd4ee Mon Sep 17 00:00:00 2001 From: Mohammed Sameer Date: Sun, 15 Sep 2013 05:31:48 +0300 Subject: [PATCH] Get rid of meego InfoBanner usage and move to a home grown component --- qml/{harmattan => }/CameraInfoBanner.qml | 47 +++++++++++++++++++++++- qml/harmattan/harmattan.qrc | 1 - qml/qml.qrc | 1 + 3 files changed, 46 insertions(+), 3 deletions(-) rename qml/{harmattan => }/CameraInfoBanner.qml (50%) diff --git a/qml/harmattan/CameraInfoBanner.qml b/qml/CameraInfoBanner.qml similarity index 50% rename from qml/harmattan/CameraInfoBanner.qml rename to qml/CameraInfoBanner.qml index bb16045..74e1eac 100644 --- a/qml/harmattan/CameraInfoBanner.qml +++ b/qml/CameraInfoBanner.qml @@ -21,7 +21,50 @@ */ import QtQuick 1.1 -import com.nokia.extras 1.1 -InfoBanner { +Rectangle { + property alias text: label.text + property bool shown: false + + width: parent.width - 16 + height: label.height * 2 + y: shown ? 8 : - (height + 8) + anchors.horizontalCenter: parent.horizontalCenter + color: "black" + border.color: "gray" + radius: 20 + + Behavior on y { + NumberAnimation {duration: 200} + } + + Timer { + id: timer + repeat: false + interval: 3000 + onTriggered: hide() + } + + MouseArea { + anchors.fill: parent + onClicked: parent.hide() + } + + CameraLabel { + id: label + anchors.verticalCenter: parent.verticalCenter + elide: Text.ElideRight + maximumLineCount: 1 + x: 16 + } + + function show() { + shown = true + timer.restart() + } + + function hide() { + shown = false + timer.stop() + } } diff --git a/qml/harmattan/harmattan.qrc b/qml/harmattan/harmattan.qrc index f4d4ac1..1a77f0f 100644 --- a/qml/harmattan/harmattan.qrc +++ b/qml/harmattan/harmattan.qrc @@ -10,7 +10,6 @@ CameraButtonRow.qml CameraQueryDialog.qml CameraWindow.qml - CameraInfoBanner.qml CameraButtonStyle.qml FullScreenThumbnail.qml CameraPositionSource.qml diff --git a/qml/qml.qrc b/qml/qml.qrc index 64101e9..541dba2 100644 --- a/qml/qml.qrc +++ b/qml/qml.qrc @@ -1,6 +1,7 @@ + CameraInfoBanner.qml CameraSettings.qml CameraTheme.qml CameraToolBar.js -- 2.25.1