diff options
author | Thanos Apollo <[email protected]> | 2024-02-21 17:18:48 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-02-21 17:18:48 +0200 |
commit | 0d18309bf3e560ddb34e4e1b676b4c8b03f6a658 (patch) | |
tree | deeea8ff37d6c6ee5f878f9ab939bff92c105f47 | |
parent | 420e68b2a635e5c72f8f5db3e1b69dc89d26d7dd (diff) |
Add custom gnosis-image-height/width
Custom value to display images height & width with, by default it's nill
-rw-r--r-- | gnosis.el | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -88,6 +88,20 @@ framework's minibuffer." :type 'function :group 'gnosis) +(defcustom gnosis-image-height nil + "Height of image to display during review. + +When nil, the image will be displayed at its original size." + :type 'integer + :group 'gnosis) + +(defcustom gnosis-image-width nil + "Width of image to display during review. + +When nil, the image will be displayed at its original size." + :type 'integer + :group 'gnosis) + (defvar gnosis-images-dir (expand-file-name "images" gnosis-dir) "Gnosis images directory.") @@ -320,7 +334,7 @@ If FALSE t, use gnosis-face-false face" "Display image for note ID." (let* ((img (gnosis-get 'images 'extras `(= id ,id))) (path-to-image (expand-file-name (or img "") (file-name-as-directory gnosis-images-dir))) - (image (create-image path-to-image 'png nil :width 500 :height 300))) + (image (create-image path-to-image 'png nil :width gnosis-image-width :height gnosis-image-height))) (when img (insert "\n\n") (insert-image image)))) |