I've got a status bar menu item, that has a bitmap image for an icon.

I am creating the icon like this:

        statusBarItem_ = statusBar.statusItem( withLength: 
NSStatusItem.squareLength )
        let itemImage = NSImage(named: "schinkel_icon")
        itemImage?.isTemplate = false
        statusBarItem_.button?.image = itemImage

My question is: what dimensions does the bitmap need to have so that there is a 
little gap above and below the bitmap in the menu bar (like with all the other 
items) ?

Currently, I have created bitmaps with 32x32 , 64x64 (2x), and 96x96 (3x) in 
the asset catalog.
The icon is shown, but it is flush with the top and bottom of the menu bar, 
which doesn't look that great.
Replacing squarelength with NSStatusItem.variableLength didn't change anything.

I have also created shorter bitmaps, like 32 pixels tall, but that didn't 
change anything either.

Thanks a lot in advance, for all kinds insights.
Best regards, Gabriel

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to