|
From: | Darren Hoo |
Subject: | bug#16574: 24.3.50; icon not shown on the splash screen (mac osx) |
Date: | Wed, 29 Jan 2014 07:52:11 +0800 |
> Date: Tue, 28 Jan 2014 12:54:46 +0800
> From: Darren Hoo <darren.hoo@gmail.com>
> Cc: 16574@debbugs.gnu.org
>How do you deduce that this is enough?
> > I don't think this is a bug, and AFAIK it has been like this for some time.
> > The image is not shown if the frame seems to be too small.
> > See use-fancy-splash-screens-p.
> >
>
> OK, I see.
> Though use-fancy-splash-screens-p is not strictly correct on this.
> If I force it to use splash screen:
>
> (defun use-fancy-splash-screens-p () t)
>
> And examine these values of the splash screen on the initial startup
> frame:
>
> (window-pixel-height)
> => 476
>
> (cdr (window-text-pixel-size
> (selected-window) nil nil nil nil t)) ; include mode-line
> => 462
>
> it has plenty room for display.
splash.xpm needs 217 pixels on
my system, and use-fancy-splash-screens-p reserves 19 more lines for
text, which on my system need 19 x 16 = 304 more pixels. The sum is
greater than either 462 or 476, so it sounds to me like
=== modified file 'lisp/startup.el'
--- lisp/startup.el 2014-01-01 07:43:34 +0000
+++ lisp/startup.el 2014-01-28 23:09:37 +0000
@@ -1590,24 +1590,28 @@
(declare-function image-size "image.c" (spec &optional pixels frame))
+
+(defun fancy-splash-file ()
+ (cond ((stringp fancy-splash-image)
+ fancy-splash-image)
+ ((display-color-p)
+ (cond ((<= (display-planes) 8)
+ (if (image-type-available-p 'xpm)
+ "splash.xpm"
+ "splash.pbm"))
+ ((or (image-type-available-p 'svg)
+ (image-type-available-p 'imagemagick))
+ "splash.svg")
+ ((image-type-available-p 'png)
+ "splash.png")
+ ((image-type-available-p 'xpm)
+ "splash.xpm")
+ (t "splash.pbm")))
+ (t "splash.pbm")))
+
(defun fancy-splash-head ()
"Insert the head part of the splash screen into the current buffer."
- (let* ((image-file (cond ((stringp fancy-splash-image)
- fancy-splash-image)
- ((display-color-p)
- (cond ((<= (display-planes) 8)
- (if (image-type-available-p 'xpm)
- "splash.xpm"
- "splash.pbm"))
- ((or (image-type-available-p 'svg)
- (image-type-available-p 'imagemagick))
- "splash.svg")
- ((image-type-available-p 'png)
- "splash.png")
- ((image-type-available-p 'xpm)
- "splash.xpm")
- (t "splash.pbm")))
- (t "splash.pbm")))
+ (let* ((image-file (fancy-splash-file))
(img (create-image image-file))
(image-width (and img (car (image-size img))))
(window-width (window-width)))
@@ -1805,22 +1809,16 @@
(defun use-fancy-splash-screens-p ()
"Return t if fancy splash screens should be used."
- (when (and (display-graphic-p)
- (or (and (display-color-p)
- (image-type-available-p 'xpm))
- (image-type-available-p 'pbm)))
- (let ((frame (fancy-splash-frame)))
- (when frame
- (let* ((img (create-image (or fancy-splash-image
- (if (and (display-color-p)
- (image-type-available-p 'xpm))
- "splash.xpm" "splash.pbm"))))
- (image-height (and img (cdr (image-size img nil frame))))
- ;; We test frame-height so that, if the frame is split
- ;; by displaying a warning, that doesn't cause the normal
- ;; splash screen to be used.
- (frame-height (1- (frame-height frame))))
- (> frame-height (+ image-height 19)))))))
+ (and (display-graphic-p)
+ (let ((frame (fancy-splash-frame)))
+ (when frame
+ (let* ((img (create-image (fancy-splash-file)))
+ (image-height (and img (cdr (image-size img nil frame))))
+ ;; We test frame-height so that, if the frame is split
+ ;; by displaying a warning, that doesn't cause the normal
+ ;; splash screen to be used.
+ (frame-height (1- (frame-height frame))))
+ (> frame-height (+ image-height 19)))))))
(defun normal-splash-screen (&optional startup concise)
[Prev in Thread] | Current Thread | [Next in Thread] |