I’m thinking on how to make the (ugly) template icons for BS.
Is there a simple way to make those template icons? I’ve tried to read some stuff here on the forum and Sam’s blog. But I must be too stupid. And I don’t want to use the bland SF Symbols.
Just to make sure we’re on the same page.
AFAIK template images are solid color images that the OS will colorize automatically for you. Generally they are black and white (like 1980s). You can make them in whatever pixel editing / drawing package you want.
To get the OS to colorize them for you, you have to get them as a NSImage (either by loading them as NSImages or by copying a NSImage from a Xojo Picture).
Then you set the template property on the NSImage. In the Ohanaware App Kit, it is done with
NSImageSetTemplate( nsimage ) = True
Big Sur adds a function for getting a NSImage from the OS that is derived from the SF Symbol fonts in he system and these images already has the template property set. For older OSes, Apple does offer a handful of images in the system (this page lists a whole bunch Fucking NSImage Syntax not my page btw)
Once you’ve gotten your NSImage, you have to use declares or code available for that app kit to set the image onto the control, menu, dock or wherever. If you convert the template image to a Xojo picture, it loses it’s template property (back to square 1).
(Not entirely sure, but in case you mean the dock icons)
The Big Sur icons are one of those spots where if you try to fake it everyone knows. We’re glaring at you, Adobe.
There are official templates from Apple: Apple Design Resources - Apple Developer
There are unofficial templates: GitHub - bjango/Bjango-Templates: Design templates for Android, iOS, macOS, Apple TV (tvOS), Apple Watch (watchOS), Windows, Windows Phone and web favicons.
Or, and I really recommend it, you’ll want to try Sam’s Iconographer app:
As for the symbology in the middle, I grab something from thenounproject.com. A pro subscription plus these templates can make you all the icons you’ll need.
@Sam Rowlands: ah, this is like greek for me. NSImage I can check out in the MBS plugin.
@Time Parnell: I hope that my squircle is squircelly enough. I’m trying to find out how to do the (ugly) toolbar icons on BS.
Oh! NSImageMBS can load a Xojo picture, and then set the .isTemplate property true.
I do this for MenuBar / StatusItem apps.
Thanks, that sounds easy.