Add transitions for image appearance
This commit is contained in:
		
					parent
					
						
							
								bec49f9bb7
							
						
					
				
			
			
				commit
				
					
						8b625da6a0
					
				
			
		
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
					@ -61,6 +61,7 @@ Rectangle {
 | 
				
			||||||
                anchors.fill: parent
 | 
					                anchors.fill: parent
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                QPixmapItem {
 | 
					                QPixmapItem {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    id: pixItem
 | 
					                    id: pixItem
 | 
				
			||||||
                    pixmap: thumbPix
 | 
					                    pixmap: thumbPix
 | 
				
			||||||
                    anchors.horizontalCenter: parent.horizontalCenter
 | 
					                    anchors.horizontalCenter: parent.horizontalCenter
 | 
				
			||||||
| 
						 | 
					@ -77,7 +78,6 @@ Rectangle {
 | 
				
			||||||
                        hoverEnabled: true
 | 
					                        hoverEnabled: true
 | 
				
			||||||
                        onClicked: {
 | 
					                        onClicked: {
 | 
				
			||||||
                            grid.currentIndex = index
 | 
					                            grid.currentIndex = index
 | 
				
			||||||
                            console.log(fileUrl)
 | 
					 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        onEntered: {
 | 
					                        onEntered: {
 | 
				
			||||||
| 
						 | 
					@ -197,10 +197,14 @@ Rectangle {
 | 
				
			||||||
            Component.onCompleted: currentIndex = -1
 | 
					            Component.onCompleted: currentIndex = -1
 | 
				
			||||||
            onAtYEndChanged: {
 | 
					            onAtYEndChanged: {
 | 
				
			||||||
                if (grid.atYEnd) {
 | 
					                if (grid.atYEnd) {
 | 
				
			||||||
    //                 danbooruService.getPostList(2, "", 10)
 | 
					                    danbooruService.getPostList(2, "", 10)
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            add: Transition {
 | 
				
			||||||
 | 
					                NumberAnimation  { property: "opacity"; from: 0; to: 1; duration: 250}
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue