Hide HImage pause button in image viewer

Have only the one from the viewer's button bar
This commit is contained in:
miruka 2020-07-20 19:34:12 -04:00
parent a8e1ece1ea
commit e5b102c761
2 changed files with 8 additions and 1 deletions

View File

@ -16,6 +16,7 @@ Image {
property alias radius: roundMask.radius property alias radius: roundMask.radius
property alias showProgressBar: progressBarLoader.active property alias showProgressBar: progressBarLoader.active
property bool showPauseButton: true
property bool pause: ! window.settings.media.autoPlayGIF property bool pause: ! window.settings.media.autoPlayGIF
property real speed: 1 property real speed: 1
@ -99,7 +100,11 @@ Image {
enableRadius: true enableRadius: true
icon.name: image.pause ? "player-play" : "player-pause" icon.name: image.pause ? "player-play" : "player-pause"
iconItem.small: true iconItem.small: true
visible: parent.width > width * 2 && parent.height > height * 2 visible:
image.showPauseButton &&
parent.width > width * 2 &&
parent.height > height * 2
onClicked: image.pause = ! image.pause onClicked: image.pause = ! image.pause
} }
} }

View File

@ -68,6 +68,7 @@ HFlickable {
Math.min(window.height, viewer.overallSize.height) Math.min(window.height, viewer.overallSize.height)
showPauseButton: false
pause: viewer.imagesPaused pause: viewer.imagesPaused
speed: viewer.imagesSpeed speed: viewer.imagesSpeed
rotation: viewer.imagesRotation rotation: viewer.imagesRotation
@ -112,6 +113,7 @@ HFlickable {
id: full id: full
anchors.fill: parent anchors.fill: parent
thumbnail: false thumbnail: false
showPauseButton: false
pause: viewer.imagesPaused pause: viewer.imagesPaused
speed: viewer.imagesSpeed speed: viewer.imagesSpeed
rotation: viewer.imagesRotation rotation: viewer.imagesRotation