添加全屏菜单标签跟随滑动

This commit is contained in:
gjq 2023-04-10 14:52:37 +08:00 committed by He Sir
parent 544f7c8894
commit b0b030096b
1 changed files with 11 additions and 0 deletions

View File

@ -389,6 +389,17 @@ RowLayout {
}
}
onContentYChanged: {
if (contentYAnimation.running) {
return
}
if ((contentY + height) === contentHeight) {
labelListView.currentIndex = labelRepeater.count - 1
return
}
labelListView.currentIndex = labelColumn.childAt(contentX,contentY).labelIndex
}
NumberAnimation {
id: contentYAnimation
target: labelViewFlickable