doc-view: cycle render DPI 100/200/300 on C-c h
This commit is contained in:
@@ -2898,10 +2898,12 @@ Same page navigation as PDF-Tools (C-j / C-k) for doc-view buffers (renders .doc
|
||||
:n "C-j" #'doc-view-next-page
|
||||
:n "C-k" #'doc-view-previous-page)
|
||||
|
||||
;; Toggle low/high render DPI, re-rasterize this buffer on demand (C-c h)
|
||||
;; Cycle render DPI 100 -> 200 -> 300 -> 100, re-rasterize this buffer (C-c h)
|
||||
(defun gortium/docview-toggle-res ()
|
||||
(interactive)
|
||||
(let ((new (if (< doc-view-resolution 150) 200 100)))
|
||||
(let ((new (cond ((< doc-view-resolution 150) 200)
|
||||
((< doc-view-resolution 250) 300)
|
||||
(t 100))))
|
||||
(setq-local doc-view-resolution new)
|
||||
(doc-view-reconvert-doc)
|
||||
(message "doc-view @ %s dpi" new)))
|
||||
|
||||
@@ -1999,10 +1999,12 @@ only injects when the project's context-tag matches current mu4e context."
|
||||
:n "C-j" #'doc-view-next-page
|
||||
:n "C-k" #'doc-view-previous-page)
|
||||
|
||||
;; Toggle low/high render DPI, re-rasterize this buffer on demand (C-c h)
|
||||
;; Cycle render DPI 100 -> 200 -> 300 -> 100, re-rasterize this buffer (C-c h)
|
||||
(defun gortium/docview-toggle-res ()
|
||||
(interactive)
|
||||
(let ((new (if (< doc-view-resolution 150) 200 100)))
|
||||
(let ((new (cond ((< doc-view-resolution 150) 200)
|
||||
((< doc-view-resolution 250) 300)
|
||||
(t 100))))
|
||||
(setq-local doc-view-resolution new)
|
||||
(doc-view-reconvert-doc)
|
||||
(message "doc-view @ %s dpi" new)))
|
||||
|
||||
Reference in New Issue
Block a user