From 4d99a5f11bd800798d5a924999d97a9f45f2dc4b Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Mon, 20 May 2019 23:17:07 +0800 Subject: [PATCH] Optimize: Make bar look better for big fonts. --- doom-modeline-segments.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index 3ba0a67..2abba64 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -1226,12 +1226,12 @@ Returns \"\" to not break --no-window-system." (doom-modeline--make-xpm 'doom-modeline-bar (or width doom-modeline-bar-width) (max (or height doom-modeline-height) - (frame-char-height))) + (ceiling (* 1.3 (frame-char-height))))) doom-modeline--bar-inactive (doom-modeline--make-xpm 'doom-modeline-inactive-bar (or width doom-modeline-bar-width) (max (or height doom-modeline-height) - (frame-char-height))))) + (ceiling (* 1.3 (frame-char-height))))))) (when (>= emacs-major-version 26) (add-variable-watcher @@ -1247,6 +1247,8 @@ Returns \"\" to not break --no-window-system." (doom-modeline-refresh-bars val doom-modeline-height))))) (add-hook 'after-setting-font-hook #'doom-modeline-refresh-bars) +(advice-add #'set-face-attribute :after #'(lambda (&rest _) + (doom-modeline-refresh-bars))) ;;