refactor(mu4e): prepare `+mu4e-normalised-icon' for extra padding

This is non-functional change to use `format' instead of `concat'. It
will make the next patch easier to read.
This commit is contained in:
Sean Farley 2023-09-28 21:06:42 -07:00 committed by Henrik Lissner
parent 10567b6cec
commit 9f922065ba

View file

@ -123,8 +123,10 @@ will also be the width of all other printable characters."
(apply icon-set `(,name :height ,height :v-adjust ,v-adjust)))) (apply icon-set `(,name :height ,height :v-adjust ,v-adjust))))
(icon-width (+mu4e--get-string-width icon)) (icon-width (+mu4e--get-string-width icon))
(space-width (+mu4e--get-string-width " ")) (space-width (+mu4e--get-string-width " "))
(space-factor (- 2 (/ (float icon-width) space-width)))) (space-factor (- 2 (/ (float icon-width) space-width)))
(concat (propertize " " 'display `(space . (:width ,space-factor))) icon))) ;; always pad the left
(space-left (propertize " " 'display `(space . (:width ,space-factor)))))
(format "%s%s" space-left icon)))
;; Set up all the fancy icons ;; Set up all the fancy icons
;;;###autoload ;;;###autoload