Improve timeline GIF auto-pausing
Pause when any popup is covering the timeline (image viewer or not), and work when opened by ctrl+o, not just when clicking the thumbnail.
This commit is contained in:
parent
93baaf51a0
commit
2fb4ad5eae
1
TODO.md
1
TODO.md
|
@ -1,7 +1,6 @@
|
|||
# TODO
|
||||
|
||||
- Image viewer:
|
||||
- stop timeline gif on ctrl+o
|
||||
- open externally in context menu in timeline thumbnail
|
||||
- hflickable support kinetic scrolling disabler and speed/decel settings
|
||||
- keyboard controls
|
||||
|
|
|
@ -62,6 +62,11 @@ HMxcImage {
|
|||
onCachedPathChanged:
|
||||
eventList.thumbnailCachedPaths[loader.singleMediaInfo.id] = cachedPath
|
||||
|
||||
Binding on pause {
|
||||
value: true
|
||||
when: Object.keys(window.visiblePopups).length > 0
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.LeftButton
|
||||
acceptedModifiers: Qt.NoModifier
|
||||
|
@ -73,12 +78,7 @@ HMxcImage {
|
|||
return
|
||||
}
|
||||
|
||||
const wasPaused = image.pause
|
||||
image.pause = true
|
||||
|
||||
eventList.openImageViewer(singleMediaInfo, "", popup => {
|
||||
popup.closed.connect(() => image.pause = wasPaused)
|
||||
})
|
||||
eventList.openImageViewer(singleMediaInfo)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user