Skip to content

Commit d82f576

Browse files
committed
fix: correct arrow list view button behavior
1. Changed `itemsView.atYEnd` to `view.atYEnd` to fix incorrect button enabling logic 2. Made `view` property required to ensure proper component initialization 3. The bug caused arrow buttons to remain enabled incorrectly when scrolling to the end of the list 4. Required property ensures view reference is always provided for proper functionality fix: 修复箭头列表视图按钮行为问题 1. 将 `itemsView.atYEnd` 改为 `view.atYEnd` 以修复按钮启用逻辑错误 2. 将 `view` 属性设为必需以确保组件正确初始化 3. 原错误导致滚动到列表末尾时箭头按钮仍错误地保持启用状态 4. 必需属性确保始终提供视图引用以保证功能正常
1 parent c34015f commit d82f576

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

qt6/src/qml/private/ArrowListViewButton.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ Loader {
1212
DownButton = 1
1313
}
1414

15-
property Item view
15+
required property Item view
1616
property int direction
1717
active: view.interactive
1818

1919
sourceComponent: Button {
2020
flat: true
21-
enabled: direction === ArrowListViewButton.UpButton ? !view.atYBeginning : !itemsView.atYEnd
21+
enabled: direction === ArrowListViewButton.UpButton ? !view.atYBeginning : !view.atYEnd
2222
width: DS.Style.arrowListView.stepButtonSize.width
2323
height: DS.Style.arrowListView.stepButtonSize.height
2424
icon.name: direction === ArrowListViewButton.UpButton ? DS.Style.arrowListView.upButtonIconName

0 commit comments

Comments
 (0)