From 5a8da4ce9742e15829e4f84e47c93ce334b6e2a5 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Tue, 14 Aug 2018 15:28:22 -0700 Subject: [PATCH] Fix 'hover-to-pause' functionality of AutoScroll Featured Stories list in the goto app --- interface/resources/qml/hifi/Feed.qml | 30 ++++++++------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/interface/resources/qml/hifi/Feed.qml b/interface/resources/qml/hifi/Feed.qml index e1c712db1f..135123595b 100644 --- a/interface/resources/qml/hifi/Feed.qml +++ b/interface/resources/qml/hifi/Feed.qml @@ -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(); } } }