qlmarkdown icon indicating copy to clipboard operation
qlmarkdown copied to clipboard

Is it possible to style the preview thumbnail?

Open frankrolf opened this issue 6 years ago • 4 comments

Thank you very much for the excellent qlmarkdown – I especially appreciate the ability to customize the preview via editing the styles.css file.

One thing I’ve always been wondering about – is the icon-size thumbnail deliberately cut to use that particular zoom ratio? Screen Shot 2019-07-01 at 19 31 52

This illustrates thumbnails of two .md files (as created by qlmarkdown) and the thumbnail of a normal text file. What would I need to do to make the quicklook file icon scale the same way as the text file does (i.e. just show the document structure)? Thanks!

frankrolf avatar Jul 01 '19 17:07 frankrolf

I haven't looked at the code for a quite a while, so take this with a grain of salt 😄

This wasn't a conscious decision. The OS renders the icon preview based on the final rendered output. So, what you are seeing is a snapshot of the rendered HTML. I am honestly not sure if we can control the rendering of the preview in the icon. My guess is that we cannot.

toland avatar Jul 10 '19 16:07 toland

Actually, you have total control over the thumbnail rendering. The code for this is in GenerateThumbnailForURL.m And can be tested with qlmanage -t testFile.md

thumbnail

(funny, this isn't even the top of the document)

relikd avatar Jan 16 '20 11:01 relikd

screen

relikd avatar Jan 16 '20 12:01 relikd

Well isn’t this just fantastic! Thank you very much!!!! 😊

frankrolf avatar Jan 16 '20 13:01 frankrolf