From 19d5d68ecd4eb1c3c7d10352d3b3a9afbb0c290b Mon Sep 17 00:00:00 2001 From: "Matthew L. Fidler" Date: Fri, 5 Aug 2016 08:59:57 -0500 Subject: [PATCH] Add option mode-icons-line-height-adjust. Can help with Issue #35 --- mode-icons.el | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mode-icons.el b/mode-icons.el index 8269947..5d98d7a 100644 --- a/mode-icons.el +++ b/mode-icons.el @@ -455,10 +455,18 @@ This only works with xpm files." ACTIVE tells if current window is active." (or face (and active 'mode-line) 'mode-line-inactive)) +(defcustom mode-icons-line-height-adjust 0 + "The manual adjustment of the mode-line height for images." + :type 'integer + :group 'mode-icons) + (defun mode-icons-line-height (&optional window) "Gets the height in pixels of WINDOW's mode-line, if accessible. -This uses `window-mode-line-height' on emacs 24.4+. Otherwise it assumes 16." - (or (and (fboundp 'window-mode-line-height) (window-mode-line-height window)) 16)) +This uses `window-mode-line-height' on emacs 24.4+. Otherwise it assumes 16. + +This function also adjusts the line height by `mode-icons-line-height-adjust'." + (+ mode-icons-line-height-adjust + (or (and (fboundp 'window-mode-line-height) (window-mode-line-height window)) 16))) (defun mode-icons-get-icon-display (icon type &optional face active) "Get the value for the display property of ICON having TYPE.