diff options
Diffstat (limited to 'appearance/AppearancePanel.qml')
| -rw-r--r-- | appearance/AppearancePanel.qml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/appearance/AppearancePanel.qml b/appearance/AppearancePanel.qml index 0547c6b..9b895f8 100644 --- a/appearance/AppearancePanel.qml +++ b/appearance/AppearancePanel.qml @@ -625,6 +625,44 @@ Scope { color: Wallpapers.qualityColor(subject, Wallpapers.target) } + // A reverse image search for a larger copy of the staged + // image. Staged, not hovered: the pointer leaves the + // thumbnail to reach the button. A search engine cannot be + // handed a local file in a URL and its upload endpoints + // sit behind bot and consent walls, so the image goes on + // the clipboard and the browser opens TinEye, which takes + // a pasted image and sorts its matches by size. The upload + // is the paste, made by the user in the browser. Always + // PNG: Firefox hands a page only image/png from the + // clipboard, so a JPEG copied as itself pasted nothing. + Column { + id: finder + readonly property string staged: + Wallpapers.target === "V" ? Wallpapers.pendingV : Wallpapers.pendingH + property string copied: "" + anchors.horizontalCenter: parent.horizontalCenter + visible: staged !== "" && Wallpapers.qualityNote(staged, Wallpapers.target) !== "" + spacing: 4 + + Tab { + anchors.horizontalCenter: parent.horizontalCenter + text: "Find a larger version" + onClicked: { + Quickshell.execDetached(["sh", "-c", + 'magick "$1" png:- | wl-copy -t image/png && xdg-open https://tineye.com/', + "sh", finder.staged]); + finder.copied = finder.staged; + } + } + Text { + anchors.horizontalCenter: parent.horizontalCenter + visible: finder.copied === finder.staged + text: "image copied: paste it on TinEye with Ctrl+V" + font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 } + color: Theme.subtext + } + } + Row { anchors.horizontalCenter: parent.horizontalCenter spacing: 8 |
