mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
Fix #30: adjust mode-line bars with font size.
This commit is contained in:
parent
973e9ce7c7
commit
e4605cd361
1 changed files with 9 additions and 3 deletions
|
@ -941,6 +941,10 @@ with `evil-ex-substitute', and/or 4. The number of active `iedit' regions."
|
|||
(when (and (eq op 'set) (integerp val))
|
||||
(doom-modeline-refresh-bars val doom-modeline-height)))))
|
||||
|
||||
(add-hook 'after-setting-font-hook
|
||||
'(lambda ()
|
||||
(doom-modeline-refresh-bars)))
|
||||
|
||||
|
||||
;;
|
||||
;; window number
|
||||
|
@ -1087,15 +1091,17 @@ See `mode-line-percent-position'.")
|
|||
;;
|
||||
|
||||
(defun doom-modeline-refresh-bars (&optional width height)
|
||||
"Refreash mode-line bars with `WIDTH' and `HEIGHT'."
|
||||
"Refresh mode-line bars with `WIDTH' and `HEIGHT'."
|
||||
(setq doom-modeline--bar-active
|
||||
(doom-modeline--make-xpm 'doom-modeline-bar
|
||||
(or width doom-modeline-bar-width)
|
||||
(or height doom-modeline-height))
|
||||
(max (or height doom-modeline-height)
|
||||
(frame-char-height)))
|
||||
doom-modeline--bar-inactive
|
||||
(doom-modeline--make-xpm 'doom-modeline-inactive-bar
|
||||
(or width doom-modeline-bar-width)
|
||||
(or height doom-modeline-height))))
|
||||
(max (or height doom-modeline-height)
|
||||
(frame-char-height)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-modeline-init ()
|
||||
|
|
Loading…
Reference in a new issue