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>
This commit is contained in:
Niels Weber
2014-04-28 09:39:16 +02:00
committed by The Qt Project
parent 2939c9953a
commit c5d184cbe3

View File

@@ -49,28 +49,40 @@ Rectangle {
signal openVideo signal openVideo
signal close signal close
Column {
anchors.fill: parent Rectangle {
spacing: 10 id: menuField
Rectangle { height: itemHeight
height: itemHeight width: itemHeight
width: itemHeight color: "transparent"
color: "transparent" anchors.right: parent.right
anchors.right: parent.right Image {
Image { id: menu
id: menu source: "qrc:///images/icon_Menu.png"
source: "qrc:///images/icon_Menu.png" anchors {
anchors { right: parent.right
right: parent.right top: parent.top
top: parent.top margins: scaledMargin
margins: scaledMargin
}
}
MouseArea {
anchors.fill: parent
onClicked: fileOpen.state == "expanded" ? fileOpen.state = "collapsed" : fileOpen.state = "expanded"
} }
} }
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 { Rectangle {
width: 0.9 * parent.width width: 0.9 * parent.width
height: 1 height: 1
@@ -81,8 +93,10 @@ Rectangle {
text: "Start camera" text: "Start camera"
height: itemHeight height: itemHeight
width: parent.width width: parent.width
onClicked: root.openCamera() onClicked: {
active: fileOpen.state == "expanded" fileOpen.state = "collapsed"
root.openCamera()
}
} }
Rectangle { Rectangle {
width: 0.9 * parent.width width: 0.9 * parent.width
@@ -94,8 +108,10 @@ Rectangle {
text: "Open image" text: "Open image"
height: itemHeight height: itemHeight
width: parent.width width: parent.width
onClicked: root.openImage() onClicked: {
active: fileOpen.state == "expanded" fileOpen.state = "collapsed"
root.openImage()
}
} }
Rectangle { Rectangle {
width: 0.9 * parent.width width: 0.9 * parent.width
@@ -107,8 +123,10 @@ Rectangle {
text: "Open video" text: "Open video"
height: itemHeight height: itemHeight
width: parent.width width: parent.width
onClicked: root.openVideo() onClicked: {
active: fileOpen.state == "expanded" fileOpen.state = "collapsed"
root.openVideo()
}
} }
Rectangle { Rectangle {
width: 0.9 * parent.width width: 0.9 * parent.width
@@ -120,8 +138,10 @@ Rectangle {
text: "Reset" text: "Reset"
height: itemHeight height: itemHeight
width: parent.width width: parent.width
onClicked: root.close() onClicked: {
active: fileOpen.state == "expanded" fileOpen.state = "collapsed"
root.close()
}
} }
Rectangle { Rectangle {
width: 0.9 * parent.width width: 0.9 * parent.width