I have long built toolbars in carbon and Win32 with icons of different sizes (16, 24, and 32 pixel). In cocoa, I discover that Push buttons and Toggle buttons always draw icons (poorly) scaled to 32 pixels while Dropdown buttons draw properly at their original size.
Is this a Xojo bug or Cocoa bug? Any known work arounds?
What sized icons are you giving the toolbar items?
If you’re going for Retina, you should use NSImages (via MBS, MacOSLib or the Retina Kit) and let the OS then display the correct icon.
Create a 32x32 transparent picture, and DrawPicture the smaller icon in the center before using it for the ToolButton.
Alternatively, do the same in a picture editor to directly feed Toolbutton with the like.
That way you keep your crisp small icon.
I believe the standard size for toolbar icons is 32 pixels, so its much better if you provide an exact sized icon. Dont know if the scaling is done by Xojo or by the OS, but in any case is still scaled and therefore never as the original.
At least if you scale it in advance, you can control the look.