App About Box - Small Icons

Weird one here; I’ve started to notice in the recent months that my apps display the Apple About Box via the code below, display a really small icon.

[code] #if TargetCocoa then
declare sub orderFrontStandardAboutPanel lib “Cocoa” selector “orderFrontStandardAboutPanel:” (class_id as Ptr)
declare function sharedApplication lib “Cocoa” selector “sharedApplication” ( classRef as Ptr ) as Ptr
declare Function NSClassFromString Lib “Foundation” (className as CFStringRef) As Ptr

  orderFrontStandardAboutPanel( sharedApplication( NSClassFromString( "NSApplication" ) ) )
#endif[/code]

I’m getting to the point where I’m running out of ideas:

  • Tried different ICNS files, including using this one as it displays correctly in the Calculator application.
  • Tried 32-Bit & 64-Bit.
  • Tried using the HIDPI option in Xojo and without.
  • Tried by forcing Retina with App Wrapper and without.
  • Tried using the ICNS generation of Xojo and getting App Wrapper to create the ICNS file.

What does work is if I create a dictionary of the values and pass it to “orderFrontStandardAboutPanelWithOptions:”, but… This means that I have to write a bunch of declares to then automatically obtain all the other data that I used to get for FREE.

What also works, is a brand new project.

Anyone else seen this problem, any suggestions as to what’s causing this that might be easy to fix.

Some more information:
A simple Xojo made application, with 1 button that calls the above code works. I’ve copied in various ICNS files and they all display at the right size.

Yes, I too lately noticed it. Keeping only 1024, 512, 256 and 128 solved the problem. Although I don’t know the reason behind this.

Okay, so I figured out what the problem is, are you ready…

I’m also displaying the application icon in a menu item, in order for it to draw correctly in the menu item, I have to set the size of the image to 16 x 16.

Once I stopped doing that, it displayed correctly in the Apple About Box. So for the menu item, I had to clone the NSImage (whilst still using the same image representations) and then set the size on that.

There’s already a function in the Retina Kit for doing this, thankfully. If you have the same issue, use the softCopy function and set the size on that, before setting it to the menu item.