From f03ae96e95bf103f555fc2e0587ed0a996713e21 Mon Sep 17 00:00:00 2001 From: Matthew Fidler Date: Wed, 13 Apr 2016 13:59:03 -0500 Subject: [PATCH] Fix image call by adding data argument -Also make sure image type is specified --- mode-icons.el | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/mode-icons.el b/mode-icons.el index 9142c18..d5b3303 100644 --- a/mode-icons.el +++ b/mode-icons.el @@ -478,7 +478,8 @@ ACTIVE is an indicator that the current window is active." (create-image (mode-icons-desaturate-xpm icon-path face) (or (and (fboundp 'imagemagick-types) (memq 'png (imagemagick-types)) 'imagemagick) - 'xpm) t :ascent 'center + 'xpm) t + :ascent 'center :height (window-mode-line-height) :face face :icon icon)) (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)) 'imagemagick) (or (and (eq type 'jpg) 'jpeg) type)) + nil :height (window-mode-line-height) :ascent 'center :face face :icon icon))))) ((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 ;; use imagemagick if available and supports PNG images ;; (allows resizing images) - (when (and (fboundp 'imagemagick-types) - (memq 'png (imagemagick-types))) - 'imagemagick) + (or (and (and (fboundp 'imagemagick-types) + (memq 'png (imagemagick-types))) + 'imagemagick) 'png) nil :height (window-mode-line-height) :ascent 'center @@ -1064,9 +1066,9 @@ ACTIVE is a flag for if the current window is active." (create-image image-file ;; use imagemagick if available and supports PNG images ;; (allows resizing images) - (when (and (fboundp 'imagemagick-types) - (memq image-type (imagemagick-types))) - 'imagemagick) + (or (and (and (fboundp 'imagemagick-types) + (memq image-type (imagemagick-types))) + 'imagemagick) 'png) nil :ascent 'center :heuristic-mask t