Align right segments after scaling font of the mode-line.

This commit is contained in:
Vincent Zhang 2019-07-09 01:53:37 +08:00
parent ce7c1006eb
commit 324ab847a2

View file

@ -391,9 +391,13 @@ If the actual char height is larger, it respects the actual char height.")
" " " "
'face (if (doom-modeline--active) 'mode-line 'mode-line-inactive) 'face (if (doom-modeline--active) 'mode-line 'mode-line-inactive)
'display `((space :align-to (- (+ right right-fringe right-margin) 'display `((space :align-to (- (+ right right-fringe right-margin)
,(string-width ,(* (if (number-or-marker-p (face-attribute 'mode-line :height))
(format-mode-line (/ (window-font-width nil 'mode-line)
(cons "" rhs-forms))))))) (frame-char-width) 1.0)
1)
(string-width
(format-mode-line
(cons "" rhs-forms))))))))
rhs-forms)) rhs-forms))
(concat "Modeline:\n" (concat "Modeline:\n"
(format " %s\n %s" (format " %s\n %s"