Popup over images in History
Thanks again for the wonderful software!
I figured out that having multiple screenshots in History leads to some usability issue:
- If you have several similar screenshots with small details on them that differs, you need to make the size of images in History bigger to catch the details and paste the right image
- So the size of images in History gets bigger and you can easily miss the needed text lines.
- Decrease the size of images and you return to beginning.
I think it would be really useful not just to expand the size of images in history, but instead have the ability to pop-up zoomed-in images when hovering on them in History. So then I would have small or medium sized images in History which can be easily seen in details if I hover them with mouse.
And of course settings then must be expanded with new variable:
- Zoom-in on hover (true/false)
- If true — To what maximum sizes should it expand
Also popup is not showing if image can't be zoomed-in since it's smaller then max height and width in History.
I really hope that this feature will be approved.
This probably won't happen, unless someone else implements it. I do not have much use for it.
Somewhat clumsy workaround is to select the image item and press F7 to open preview dock to show full image.
The following command can automatically turn on preview function when click/fouces on images and long text, but it still cannot control the size of the preview window or turn on preview when hovering.
[Command]
Name=Auto preview image and longtext
MatchCommand="
copyq:
var auto_preview = true
if (auto_preview) {
var preview_image = true
var preview_longText = true
var LongTextCharacters = 100
var LongTextLines = 2
if (visible()) {
var format = str(dataFormats())
var content = str(data(mimeUriList)) || str(data(mimeText))
if (preview_image && (format.match(/image\\/.*/)
|| content.match(/^file:.*(png|jpe?g|bmp|svg|gif)$/))
||
preview_longText && (content.length > LongTextCharacters
|| countLines(content) > LongTextLines)) {
preview(true)
} else {
preview(false)
}
}
function countLines(str) {
var newLine = str.match(/\\n/g)
return newLine ? newLine.length + 1 : 0
}
}
"
Command="
copyq:
preview(false) || preview(true)
"
InMenu=true
Icon=\xf06e
Shortcut=space