Fix rescaling of images via 'text-scale-mode' in EWW
* lisp/net/eww.el (eww--rescale-images): Handle a :scale of 'default' (bug#71741).
This commit is contained in:
parent
feac6e298d
commit
3abcfe013d
1 changed files with 9 additions and 5 deletions
|
@ -1371,12 +1371,16 @@ within text input fields."
|
|||
(goto-char (point-min))
|
||||
(while-let ((match (text-property-search-forward
|
||||
'display nil (lambda (_ value) (imagep value)))))
|
||||
(let ((image (prop-match-value match)))
|
||||
(unless (image-property image :original-scale)
|
||||
(setf (image-property image :original-scale)
|
||||
(or (image-property image :scale) 1)))
|
||||
(let* ((image (prop-match-value match))
|
||||
(original-scale (or (image-property image :original-scale)
|
||||
(setf (image-property image :original-scale)
|
||||
(or (image-property image :scale)
|
||||
'default)))))
|
||||
(when (eq original-scale 'default)
|
||||
(setq original-scale (image-compute-scaling-factor
|
||||
image-scaling-factor)))
|
||||
(setf (image-property image :scale)
|
||||
(* (image-property image :original-scale) scaling)))))))
|
||||
(* original-scale scaling)))))))
|
||||
|
||||
(defun eww--url-at-point ()
|
||||
"`thing-at-point' provider function."
|
||||
|
|
Loading…
Add table
Reference in a new issue