Image viewer open: pause timeline URL preview GIF
This commit is contained in:
parent
377f1ffd4a
commit
5a1ca24e65
@ -18,6 +18,7 @@ Image {
|
|||||||
property alias showProgressBar: progressBarLoader.active
|
property alias showProgressBar: progressBarLoader.active
|
||||||
property bool showPauseButton: true
|
property bool showPauseButton: true
|
||||||
property bool pause: ! window.settings.media.autoPlayGIF
|
property bool pause: ! window.settings.media.autoPlayGIF
|
||||||
|
property bool forcePause: false
|
||||||
property real speed: 1
|
property real speed: 1
|
||||||
|
|
||||||
readonly property int circleRadius:
|
readonly property int circleRadius:
|
||||||
@ -67,8 +68,9 @@ Image {
|
|||||||
// Online GIFs won't be able to loop if cache is set to false,
|
// Online GIFs won't be able to loop if cache is set to false,
|
||||||
// but caching GIFs is expansive.
|
// but caching GIFs is expansive.
|
||||||
cache: ! Qt.resolvedUrl(source).startsWith("file://")
|
cache: ! Qt.resolvedUrl(source).startsWith("file://")
|
||||||
paused: ! visible || window.hidden || image.pause
|
|
||||||
speed: image.speed
|
speed: image.speed
|
||||||
|
paused:
|
||||||
|
! visible || window.hidden || image.pause || image.forcePause
|
||||||
|
|
||||||
layer.enabled: image.radius !== 0
|
layer.enabled: image.radius !== 0
|
||||||
layer.effect: OpacityMask { maskSource: roundMask }
|
layer.effect: OpacityMask { maskSource: roundMask }
|
||||||
|
@ -65,6 +65,7 @@ HMxcImage {
|
|||||||
clientUserId: chat.userId
|
clientUserId: chat.userId
|
||||||
title: thumbnail ? loader.thumbnailTitle : loader.title
|
title: thumbnail ? loader.thumbnailTitle : loader.title
|
||||||
animated: eventList.isAnimated(loader.singleMediaInfo, loader.mediaUrl)
|
animated: eventList.isAnimated(loader.singleMediaInfo, loader.mediaUrl)
|
||||||
|
forcePause: Object.keys(window.visiblePopups).length > 0
|
||||||
thumbnail: ! animated && loader.thumbnailMxc
|
thumbnail: ! animated && loader.thumbnailMxc
|
||||||
mxc: thumbnail ?
|
mxc: thumbnail ?
|
||||||
(loader.thumbnailMxc || loader.mediaUrl) :
|
(loader.thumbnailMxc || loader.mediaUrl) :
|
||||||
@ -75,14 +76,10 @@ HMxcImage {
|
|||||||
loader.singleMediaInfo.media_crypt_dict
|
loader.singleMediaInfo.media_crypt_dict
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
onCachedPathChanged:
|
onCachedPathChanged:
|
||||||
eventList.thumbnailCachedPaths[loader.singleMediaInfo.id] = cachedPath
|
eventList.thumbnailCachedPaths[loader.singleMediaInfo.id] = cachedPath
|
||||||
|
|
||||||
Binding on pause {
|
|
||||||
value: true
|
|
||||||
when: Object.keys(window.visiblePopups).length > 0
|
|
||||||
}
|
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
acceptedButtons: Qt.LeftButton
|
acceptedButtons: Qt.LeftButton
|
||||||
acceptedModifiers: Qt.NoModifier
|
acceptedModifiers: Qt.NoModifier
|
||||||
|
Loading…
x
Reference in New Issue
Block a user