From 7f95e8b8d829ac599eb96e6e5dd6088081bfe481 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Fri, 21 Dec 2018 00:54:12 +0800 Subject: [PATCH] Optimize: Set height via font. --- doom-modeline.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/doom-modeline.el b/doom-modeline.el index 3b80b38..8828340 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -81,11 +81,8 @@ ;; Variables ;; -(defvar doom-modeline-height (pcase system-type - ('darwin 25) - ('gnu/linux 30) - ('windows-nt 40) - (_ 26)) +(defvar doom-modeline-height (let ((font (face-font 'mode-line))) + (if font (* 2 (aref (font-info font) 2)) 25)) "How tall the mode-line should be (only respected in GUI Emacs).") (defvar doom-modeline-bar-width 3