From 51792459fbacc130d7720f28cc5ae43d95769fbc Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Fri, 20 Feb 2015 07:31:42 +0100 Subject: [PATCH] Simplify the handling of visibility in the QML view --- src/qml/danbooruimageview.qml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/qml/danbooruimageview.qml b/src/qml/danbooruimageview.qml index 63e7bb9..ae33682 100644 --- a/src/qml/danbooruimageview.qml +++ b/src/qml/danbooruimageview.qml @@ -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