Simplify the handling of visibility in the QML view

This commit is contained in:
Luca Beltrame 2015-02-20 07:31:42 +01:00
parent 25ff37df18
commit 51792459fb

View file

@ -77,6 +77,8 @@ Rectangle {
MouseArea {
id: mouseArea
anchors.fill: parent
height: parent.height
width: parent.width
hoverEnabled: true
onClicked: {
@ -86,8 +88,6 @@ Rectangle {
onEntered: {
viewButton.visible = true
downloadButton.visible = true
viewButton.opacity = 1
downloadButton.opacity = 1
@ -101,7 +101,7 @@ Rectangle {
Button {
id: viewButton
iconName: "view-preview"
visible: false
visible: opacity > 0
opacity: 0
anchors.top: parent.top
@ -129,7 +129,8 @@ Rectangle {
id: downloadButton
iconName: "download"
visible: false
visible: opacity > 0
opacity: 0
anchors.bottom: parent.bottom
anchors.left: parent.left