Don't show "Hide Image" button for really tiny images

Otherwise, it looks really buggy.
This commit is contained in:
Joshua Goins
2026-01-14 20:42:47 -05:00
parent e1bbbfe4fd
commit 508c2bee46

View File

@@ -47,10 +47,13 @@ Item {
implicitHeight: mediaSizeHelper.currentSize.height
QQC2.Button {
id: hideButton
anchors.right: parent.right
anchors.top: parent.top
anchors.margins: Kirigami.Units.smallSpacing
visible: !_private.hideImage
// For tiny images, having the button looks super buggy at their size
visible: !_private.hideImage && root.width >= hideButton.width && root.height >= hideButton.height
icon.name: "view-hidden"
text: i18nc("@action:button", "Hide Image")
display: QQC2.Button.IconOnly