Nit
This commit is contained in:
parent
c2524b420e
commit
bfc3e1c792
@ -43,17 +43,16 @@
|
|||||||
(left-margin (center-content--calculate-left-margin (car content-size)))
|
(left-margin (center-content--calculate-left-margin (car content-size)))
|
||||||
(top-margin (center-content--calculate-top-margin (cdr content-size))))
|
(top-margin (center-content--calculate-top-margin (cdr content-size))))
|
||||||
;; Apply horizontal centering using overlay
|
;; Apply horizontal centering using overlay
|
||||||
(let ((overlay (make-overlay (point-min) (point-max))))
|
(let ((overlay (make-overlay (point-min) (point-max)))
|
||||||
(overlay-put overlay 'line-prefix
|
(space (propertize " " 'display `(space :width ,left-margin))))
|
||||||
(propertize " " 'display `(space :width ,left-margin)))
|
(overlay-put overlay 'line-prefix space)
|
||||||
(setq center-content--horizontal-overlay overlay))
|
(setq center-content--horizontal-overlay overlay))
|
||||||
;; Apply vertical centering using header-line-format
|
;; Apply vertical centering using header-line-format
|
||||||
;; Save and remap the header-line face to match the default face
|
;; Save and remap the header-line face to match the default face
|
||||||
(setq center-content--original-header-line-format header-line-format)
|
(setq center-content--original-header-line-format header-line-format)
|
||||||
(setq center-content--header-line-face-remap-cookie
|
(setq center-content--header-line-face-remap-cookie
|
||||||
(face-remap-add-relative 'header-line 'default))
|
(face-remap-add-relative 'header-line 'default))
|
||||||
(setq header-line-format
|
(setq header-line-format (propertize " " 'display `(height ,top-margin)))
|
||||||
(propertize " " 'display `(height ,top-margin)))
|
|
||||||
;; Save and hide the mode line
|
;; Save and hide the mode line
|
||||||
(setq center-content--original-mode-line-format mode-line-format)
|
(setq center-content--original-mode-line-format mode-line-format)
|
||||||
(setq mode-line-format nil)
|
(setq mode-line-format nil)
|
||||||
|
Loading…
Reference in New Issue
Block a user