emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 26d5b51: Center Emacs logo above text on the splash screen


From: Stefan Kangas
Subject: master 26d5b51: Center Emacs logo above text on the splash screen
Date: Tue, 7 Sep 2021 22:19:19 -0400 (EDT)

branch: master
commit 26d5b510e18e5a7729441e078459d0a9df0cbbcf
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Center Emacs logo above text on the splash screen
    
    * lisp/startup.el (fancy-splash-head): Center Emacs logo above
    text on the splash and about screen.
---
 lisp/startup.el | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/lisp/startup.el b/lisp/startup.el
index 58030ca..505d7b8 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1788,9 +1788,19 @@ a face or button specification."
         (window-width (window-width)))
     (when img
       (when (> window-width image-width)
-       ;; Center the image in the window.
-       (insert (propertize " " 'display
-                           `(space :align-to (+ center (-0.5 . ,img)))))
+        ;; Center the image above text.
+        ;;  NB. The logo used to be centered in the window, which made
+        ;;      it align poorly with the non-centered text on large
+        ;;      displays.  Arguably it would be better to center both
+        ;;      text and image, but this will do for now.  -- SK
+        (let ((text-width 80)
+              ;; The below value chosen to avoid splash screen being
+              ;; visually unbalanced.  This needs to be eye-balled.
+              (adjust-left 3))
+          (insert (propertize " " 'display
+                              `(space :align-to (+ ,(- (/ text-width 2)
+                                                       adjust-left)
+                                                   (-0.5 . ,img))))))
 
        ;; Change the color of the XPM version of the splash image
        ;; so that it is visible with a dark frame background.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]