mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 02:43:32 +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;
|
textSizeSmall: root.textSizeSmall;
|
||||||
stackShadowNarrowing: root.stackShadowNarrowing;
|
stackShadowNarrowing: root.stackShadowNarrowing;
|
||||||
shadowHeight: root.stackedCardShadowHeight;
|
shadowHeight: root.stackedCardShadowHeight;
|
||||||
hoverThunk: function () { hovered = true }
|
hoverThunk: function () {
|
||||||
unhoverThunk: function () { hovered = false }
|
hovered = true;
|
||||||
|
autoScrollTimer.stop();
|
||||||
|
}
|
||||||
|
unhoverThunk: function () {
|
||||||
|
hovered = false;
|
||||||
|
autoScrollTimer.start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onCountChanged: {
|
onCountChanged: {
|
||||||
|
@ -156,25 +162,7 @@ Column {
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
if (root.autoScrollTimerEnabled) {
|
if (root.autoScrollTimerEnabled) {
|
||||||
autoScrollTimer.interval = suggestions.get(scroll.currentIndex).time_before_autoscroll_ms;
|
autoScrollTimer.interval = suggestions.get(scroll.currentIndex).time_before_autoscroll_ms;
|
||||||
if (!feedMouseArea.containsMouse) {
|
autoScrollTimer.start();
|
||||||
autoScrollTimer.start();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
id: feedMouseArea;
|
|
||||||
enabled: root.autoScrollTimerEnabled;
|
|
||||||
anchors.fill: parent;
|
|
||||||
hoverEnabled: true;
|
|
||||||
propagateComposedEvents: true;
|
|
||||||
onEntered: {
|
|
||||||
if (autoScrollTimer.running) {
|
|
||||||
autoScrollTimer.stop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onExited: {
|
|
||||||
autoScrollTimer.restart();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue