From e5b102c761db9a1e647a2a26a3fd162a8fbe123e Mon Sep 17 00:00:00 2001 From: miruka Date: Mon, 20 Jul 2020 19:34:12 -0400 Subject: [PATCH] Hide HImage pause button in image viewer Have only the one from the viewer's button bar --- src/gui/Base/HImage.qml | 7 ++++++- src/gui/Popups/ImageViewerPopup/ViewerCanvas.qml | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/Base/HImage.qml b/src/gui/Base/HImage.qml index 572a4acb..32858380 100644 --- a/src/gui/Base/HImage.qml +++ b/src/gui/Base/HImage.qml @@ -16,6 +16,7 @@ Image { property alias radius: roundMask.radius property alias showProgressBar: progressBarLoader.active + property bool showPauseButton: true property bool pause: ! window.settings.media.autoPlayGIF property real speed: 1 @@ -99,7 +100,11 @@ Image { enableRadius: true icon.name: image.pause ? "player-play" : "player-pause" 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 } } diff --git a/src/gui/Popups/ImageViewerPopup/ViewerCanvas.qml b/src/gui/Popups/ImageViewerPopup/ViewerCanvas.qml index ee4a995d..6b6ad460 100644 --- a/src/gui/Popups/ImageViewerPopup/ViewerCanvas.qml +++ b/src/gui/Popups/ImageViewerPopup/ViewerCanvas.qml @@ -68,6 +68,7 @@ HFlickable { Math.min(window.height, viewer.overallSize.height) + showPauseButton: false pause: viewer.imagesPaused speed: viewer.imagesSpeed rotation: viewer.imagesRotation @@ -112,6 +113,7 @@ HFlickable { id: full anchors.fill: parent thumbnail: false + showPauseButton: false pause: viewer.imagesPaused speed: viewer.imagesSpeed rotation: viewer.imagesRotation