mirror of
https://github.com/ryuslash/mode-icons.git
synced 2024-11-21 17:40:30 +01:00
Add :height property to images
This allows rescaling with imagemagick.
This commit is contained in:
parent
c5ce3cdfab
commit
3d9d4c5a63
1 changed files with 6 additions and 1 deletions
|
@ -461,12 +461,14 @@ ACTIVE is an indicator that the current window is active."
|
||||||
t :ascent 'center
|
t :ascent 'center
|
||||||
:face face
|
:face face
|
||||||
:xpm-bw t
|
:xpm-bw t
|
||||||
|
:height (window-mode-line-height)
|
||||||
:icon icon))
|
:icon icon))
|
||||||
((eq type 'xpm-bw)
|
((eq type 'xpm-bw)
|
||||||
(create-image icon-path
|
(create-image icon-path
|
||||||
(or (and (fboundp 'imagemagick-types)
|
(or (and (fboundp 'imagemagick-types)
|
||||||
(memq 'png (imagemagick-types)) 'imagemagick)
|
(memq 'png (imagemagick-types)) 'imagemagick)
|
||||||
'xpm)
|
'xpm)
|
||||||
|
:height (window-mode-line-height)
|
||||||
:ascent 'center
|
:ascent 'center
|
||||||
:face face
|
:face face
|
||||||
:icon icon))
|
:icon icon))
|
||||||
|
@ -477,6 +479,7 @@ ACTIVE is an indicator that the current window is active."
|
||||||
(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)
|
||||||
:face face :icon icon))
|
:face face :icon icon))
|
||||||
(t
|
(t
|
||||||
(create-image icon-path
|
(create-image icon-path
|
||||||
|
@ -484,6 +487,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))
|
||||||
|
: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)))
|
||||||
(get-text-property 0 'display tmp))
|
(get-text-property 0 'display tmp))
|
||||||
|
@ -1011,6 +1015,7 @@ ACTIVE is a flag telling if the current window is active."
|
||||||
(memq 'png (imagemagick-types)))
|
(memq 'png (imagemagick-types)))
|
||||||
'imagemagick)
|
'imagemagick)
|
||||||
nil
|
nil
|
||||||
|
:height (window-mode-line-height)
|
||||||
:ascent 'center
|
:ascent 'center
|
||||||
:heuristic-mask t
|
:heuristic-mask t
|
||||||
:face face)
|
:face face)
|
||||||
|
@ -1068,7 +1073,7 @@ ACTIVE is a flag for if the current window is active."
|
||||||
:face face
|
:face face
|
||||||
;; :background (emojify--get-image-background beg end)
|
;; :background (emojify--get-image-background beg end)
|
||||||
;; no-op if imagemagick is not available
|
;; no-op if imagemagick is not available
|
||||||
:height (emojify-default-font-height))
|
:height (window-mode-line-height))
|
||||||
'face face
|
'face face
|
||||||
'mode-icons-p icon-spec))))))
|
'mode-icons-p icon-spec))))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue