toland / qlmarkdown

QuickLook generator for Markdown files.
3.24k stars 141 forks source link

Is it possible to style the preview thumbnail? #88

Open frankrolf opened 5 years ago

frankrolf commented 5 years ago

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!

toland commented 5 years ago

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.

relikd commented 4 years ago

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 commented 4 years ago

screen

frankrolf commented 4 years ago

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