@@ -16,16 +16,49 @@ Loader {
1616 property int direction
1717 active: view .interactive
1818
19- sourceComponent: Button {
20- flat : true
19+ sourceComponent: ActionButton {
20+ palette . windowText : undefined
2121 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
2525 : DS .Style .arrowListView .downButtonIconName
2626 icon .width : DS .Style .arrowListView .stepButtonIconSize .width
2727 icon .height : DS .Style .arrowListView .stepButtonIconSize .height
28- onClicked: direction === ArrowListViewButton .UpButton ? view .decrementCurrentIndex ()
29- : view .incrementCurrentIndex ()
28+
29+ // Unified scroll operation function
30+ function performScroll () {
31+ direction === ArrowListViewButton .UpButton ? view .decrementCurrentIndex ()
32+ : view .incrementCurrentIndex ()
33+ }
34+
35+ // Auto-scroll control properties using state machine approach
36+ property bool shouldAutoScroll: hovered && enabled
37+ property bool delayCompleted: false
38+
39+ // Timer for initial delay before starting hover scroll
40+ Timer {
41+ id: initialDelayTimer
42+ interval: 300
43+ repeat: false
44+ running: shouldAutoScroll && ! delayCompleted
45+ onTriggered: delayCompleted = true
46+ }
47+
48+ // Timer for continuous hover scrolling
49+ Timer {
50+ id: hoverScrollTimer
51+ interval: 100
52+ repeat: true
53+ running: shouldAutoScroll && delayCompleted
54+ onTriggered: performScroll ()
55+ }
56+
57+ // Reset state when auto-scroll should stop
58+ onShouldAutoScrollChanged: {
59+ if (! shouldAutoScroll) {
60+ delayCompleted = false
61+ }
62+ }
3063 }
3164}
0 commit comments