mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Fix 'hover-to-pause' functionality of AutoScroll Featured Stories list in the goto app
This commit is contained in:
parent
987d8569ae
commit
5a8da4ce97
1 changed files with 9 additions and 21 deletions
|
@ -141,8 +141,14 @@ Column {
|
|||
textSizeSmall: root.textSizeSmall;
|
||||
stackShadowNarrowing: root.stackShadowNarrowing;
|
||||
shadowHeight: root.stackedCardShadowHeight;
|
||||
hoverThunk: function () { hovered = true }
|
||||
unhoverThunk: function () { hovered = false }
|
||||
hoverThunk: function () {
|
||||
hovered = true;
|
||||
autoScrollTimer.stop();
|
||||
}
|
||||
unhoverThunk: function () {
|
||||
hovered = false;
|
||||
autoScrollTimer.start();
|
||||
}
|
||||
}
|
||||
|
||||
onCountChanged: {
|
||||
|
@ -156,25 +162,7 @@ Column {
|
|||
onCurrentIndexChanged: {
|
||||
if (root.autoScrollTimerEnabled) {
|
||||
autoScrollTimer.interval = suggestions.get(scroll.currentIndex).time_before_autoscroll_ms;
|
||||
if (!feedMouseArea.containsMouse) {
|
||||
autoScrollTimer.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: feedMouseArea;
|
||||
enabled: root.autoScrollTimerEnabled;
|
||||
anchors.fill: parent;
|
||||
hoverEnabled: true;
|
||||
propagateComposedEvents: true;
|
||||
onEntered: {
|
||||
if (autoScrollTimer.running) {
|
||||
autoScrollTimer.stop();
|
||||
}
|
||||
}
|
||||
onExited: {
|
||||
autoScrollTimer.restart();
|
||||
autoScrollTimer.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue