Simplify the handling of visibility in the QML view
This commit is contained in:
		
					parent
					
						
							
								25ff37df18
							
						
					
				
			
			
				commit
				
					
						51792459fb
					
				
			
		
					 1 changed files with 5 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue