toland / qlmarkdown

QuickLook generator for Markdown files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to style the preview thumbnail?

frankrolf opened this issue · 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!

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.

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)

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