summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels Weber <niels.weber@digia.com>2014-04-28 09:39:16 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-30 13:40:34 +0200
commitc5d184cbe38d8024c6354952d3103423d51638ec (patch)
tree3cc5eab571a16e961b4c43246071ea80053ea9db
parent2939c9953ad08e659722c2b832f2c35db6de0115 (diff)
Selecting something now closes menu
On a closed menu, the text is now hidden. Task-number: QTBUG-38121 Change-Id: I305fd4f24768115ed21495857cce672d8cbd2135 Reviewed-by: Petref Saraci <petref.saraci@digia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml76
1 files changed, 48 insertions, 28 deletions
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml
index b0542cb80..a4de2cbb9 100644
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml
+++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml
@@ -49,28 +49,40 @@ Rectangle {
signal openVideo
signal close
- Column {
- anchors.fill: parent
- spacing: 10
- Rectangle {
- height: itemHeight
- width: itemHeight
- color: "transparent"
- anchors.right: parent.right
- Image {
- id: menu
- source: "qrc:///images/icon_Menu.png"
- anchors {
- right: parent.right
- top: parent.top
- margins: scaledMargin
- }
- }
- MouseArea {
- anchors.fill: parent
- onClicked: fileOpen.state == "expanded" ? fileOpen.state = "collapsed" : fileOpen.state = "expanded"
+
+ Rectangle {
+ id: menuField
+ height: itemHeight
+ width: itemHeight
+ color: "transparent"
+ anchors.right: parent.right
+ Image {
+ id: menu
+ source: "qrc:///images/icon_Menu.png"
+ anchors {
+ right: parent.right
+ top: parent.top
+ margins: scaledMargin
}
}
+ MouseArea {
+ anchors.fill: parent
+ onClicked: fileOpen.state == "expanded" ? fileOpen.state = "collapsed" : fileOpen.state = "expanded"
+ }
+ }
+
+ Column {
+ anchors {
+ top: menuField.bottom
+ right: parent.right
+ left: parent.left
+ bottom: parent.bottom
+ topMargin: 10
+ }
+
+ spacing: 10
+ visible: fileOpen.state == "expanded"
+
Rectangle {
width: 0.9 * parent.width
height: 1
@@ -81,8 +93,10 @@ Rectangle {
text: "Start camera"
height: itemHeight
width: parent.width
- onClicked: root.openCamera()
- active: fileOpen.state == "expanded"
+ onClicked: {
+ fileOpen.state = "collapsed"
+ root.openCamera()
+ }
}
Rectangle {
width: 0.9 * parent.width
@@ -94,8 +108,10 @@ Rectangle {
text: "Open image"
height: itemHeight
width: parent.width
- onClicked: root.openImage()
- active: fileOpen.state == "expanded"
+ onClicked: {
+ fileOpen.state = "collapsed"
+ root.openImage()
+ }
}
Rectangle {
width: 0.9 * parent.width
@@ -107,8 +123,10 @@ Rectangle {
text: "Open video"
height: itemHeight
width: parent.width
- onClicked: root.openVideo()
- active: fileOpen.state == "expanded"
+ onClicked: {
+ fileOpen.state = "collapsed"
+ root.openVideo()
+ }
}
Rectangle {
width: 0.9 * parent.width
@@ -120,8 +138,10 @@ Rectangle {
text: "Reset"
height: itemHeight
width: parent.width
- onClicked: root.close()
- active: fileOpen.state == "expanded"
+ onClicked: {
+ fileOpen.state = "collapsed"
+ root.close()
+ }
}
Rectangle {
width: 0.9 * parent.width