Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Image loading (NS): respect DPI. Provide high-resolution version of l…

…ogo.

aquamacs-fancy-splash-screen.jpg now named aquamacs-logo.tiff

Conflicts:

	src/nsimage.m
  • Loading branch information...
commit 8331e6795444bee1f741a706f370a15b70d2709e 1 parent db6ed87
@davidswelt authored
View
2  Makefile.in
@@ -456,7 +456,7 @@ install-aquamacs: mkdir
(cd $(ns_appresdir)/etc/images && find . -name '*.svg' -delete ; cd -) ; \
(cp $(AQUAMACS_DIR)/src/site-lisp/tabbar/*.png $(ns_appresdir)/etc/images/ && \
rm $(ns_appresdir)/lisp/aquamacs/tabbar/*.png) ; \
- cp $(AQUAMACS_DIR)/src/etc/aquamacs-splash-screen.jpg $(ns_appresdir)/etc/images/ ; \
+ cp $(AQUAMACS_DIR)/src/etc/aquamacs-logo.tiff $(ns_appresdir)/etc/images/ ; \
rm -r "$(ns_appresdir)/Aquamacs Help" 2>/dev/null ; \
cp -r $(AQUAMACS_DIR)"/doc/Aquamacs Help" "$(ns_appresdir)/Aquamacs Help" ; \
(cd $(ns_appresdir)/leim ; rm quail/*.el quail/*.el.gz ja-dic/*.el ja-dic/*.el.gz ; cd -) ; \
View
415 aquamacs/src/etc/Aquamacs-logo.svg
415 additions, 0 deletions not shown
View
BIN  aquamacs/src/etc/aquamacs-logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  aquamacs/src/etc/aquamacs-logo.tiff
Binary file not shown
View
BIN  aquamacs/src/etc/aquamacs-logo@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  aquamacs/src/etc/aquamacs-splash-screen.jpg
Deleted file not rendered
View
2  aquamacs/src/site-lisp/aquamacs.el
@@ -1345,7 +1345,7 @@ to the selected frame."
(require 'savehist) ;; because we configure and activate it
(aquamacs-set-defaults
- '((fancy-splash-image "aquamacs-splash-screen.jpg")
+ '((fancy-splash-image "aquamacs-logo.tiff")
(fancy-splash-max-time 3000)))
;; while pc selection mode will be turned on, we don't
View
17 src/nsimage.m
@@ -204,17 +204,30 @@ @implementation EmacsImage
image = [[EmacsImage alloc] initByReferencingFile:
[NSString stringWithUTF8String: SDATA (found)]];
+ // image = [NSImage imageNamed: [NSString stringWithUTF8String: SDATA (found)]];
+
+
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+ imgRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]];
+#else
imgRep = [image bestRepresentationForDevice: nil];
+#endif
if (imgRep == nil)
{
[image release];
return nil;
}
+ /* Do not ignore the DPI of the image - in case of multiple representations
+ (e.g., TIFFs with images for multiple resolutions), retain image size and
+ let NSImage choose the right representation. */
+
/* The next two lines cause the DPI of the image to be ignored.
This seems to be the behavior users expect. */
- [image setScalesWhenResized: YES];
- [image setSize: NSMakeSize([imgRep pixelsWide], [imgRep pixelsHigh])];
+ // [image setScalesWhenResized: YES];
+ // [image setSize: NSMakeSize([imgRep pixelsWide], [imgRep pixelsHigh])];
+ // this would retain the size:
+ // [image setSize: NSMakeSize([image size].width, [image size].height)];
[image setName: [NSString stringWithUTF8String: SDATA (file)]];
[image reference];
Please sign in to comment.
Something went wrong with that request. Please try again.