mapwidgetcontextmenu: add a listViewIsVisible integer property

This property would act like a state flag. If -1 (default) no QML State
animation will be pefromed, otherwise the ListView will either fade in
(1), or fade out (0) when the user clicks the context menu button
(Image) or selects an item from the list.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2017-07-21 00:41:37 +03:00 committed by Dirk Hohndel
parent 4808f5f9b6
commit 95b0d43104

View file

@ -21,6 +21,7 @@ Item {
anchors.fill: parent
onClicked: {
contextMenuImageAnimation.restart()
listViewIsVisible = (listViewIsVisible !== 1) ? 1 : 0
}
}
}
@ -78,4 +79,6 @@ Item {
Behavior on color { ColorAnimation { duration: itemAnimationDuration }}
}
}
property int listViewIsVisible: -1
}