mirror of
https://github.com/ryuslash/mode-icons.git
synced 2024-11-21 17:40:30 +01:00
Fix image call by adding data argument
-Also make sure image type is specified
This commit is contained in:
parent
3d9d4c5a63
commit
f03ae96e95
1 changed files with 9 additions and 7 deletions
|
@ -478,7 +478,8 @@ ACTIVE is an indicator that the current window is active."
|
||||||
(create-image (mode-icons-desaturate-xpm icon-path face)
|
(create-image (mode-icons-desaturate-xpm icon-path face)
|
||||||
(or (and (fboundp 'imagemagick-types)
|
(or (and (fboundp 'imagemagick-types)
|
||||||
(memq 'png (imagemagick-types)) 'imagemagick)
|
(memq 'png (imagemagick-types)) 'imagemagick)
|
||||||
'xpm) t :ascent 'center
|
'xpm) t
|
||||||
|
:ascent 'center
|
||||||
:height (window-mode-line-height)
|
:height (window-mode-line-height)
|
||||||
:face face :icon icon))
|
:face face :icon icon))
|
||||||
(t
|
(t
|
||||||
|
@ -487,6 +488,7 @@ ACTIVE is an indicator that the current window is active."
|
||||||
(memq (or (and (eq type 'jpg) 'jpeg) type) (imagemagick-types))
|
(memq (or (and (eq type 'jpg) 'jpeg) type) (imagemagick-types))
|
||||||
'imagemagick)
|
'imagemagick)
|
||||||
(or (and (eq type 'jpg) 'jpeg) type))
|
(or (and (eq type 'jpg) 'jpeg) type))
|
||||||
|
nil
|
||||||
:height (window-mode-line-height)
|
:height (window-mode-line-height)
|
||||||
:ascent 'center :face face :icon icon)))))
|
:ascent 'center :face face :icon icon)))))
|
||||||
((and (eq type 'emoji) (setq tmp (mode-icons--get-emoji " " (list "" icon type) face)))
|
((and (eq type 'emoji) (setq tmp (mode-icons--get-emoji " " (list "" icon type) face)))
|
||||||
|
@ -1011,9 +1013,9 @@ ACTIVE is a flag telling if the current window is active."
|
||||||
(create-image png
|
(create-image png
|
||||||
;; use imagemagick if available and supports PNG images
|
;; use imagemagick if available and supports PNG images
|
||||||
;; (allows resizing images)
|
;; (allows resizing images)
|
||||||
(when (and (fboundp 'imagemagick-types)
|
(or (and (and (fboundp 'imagemagick-types)
|
||||||
(memq 'png (imagemagick-types)))
|
(memq 'png (imagemagick-types)))
|
||||||
'imagemagick)
|
'imagemagick) 'png)
|
||||||
nil
|
nil
|
||||||
:height (window-mode-line-height)
|
:height (window-mode-line-height)
|
||||||
:ascent 'center
|
:ascent 'center
|
||||||
|
@ -1064,9 +1066,9 @@ ACTIVE is a flag for if the current window is active."
|
||||||
(create-image image-file
|
(create-image image-file
|
||||||
;; use imagemagick if available and supports PNG images
|
;; use imagemagick if available and supports PNG images
|
||||||
;; (allows resizing images)
|
;; (allows resizing images)
|
||||||
(when (and (fboundp 'imagemagick-types)
|
(or (and (and (fboundp 'imagemagick-types)
|
||||||
(memq image-type (imagemagick-types)))
|
(memq image-type (imagemagick-types)))
|
||||||
'imagemagick)
|
'imagemagick) 'png)
|
||||||
nil
|
nil
|
||||||
:ascent 'center
|
:ascent 'center
|
||||||
:heuristic-mask t
|
:heuristic-mask t
|
||||||
|
|
Loading…
Reference in a new issue