Correct icon height in status bar?
Correct icon height in status bar?
- Subject: Correct icon height in status bar?
- From: Gabriel Zachmann via Cocoa-dev <email@hidden>
- Date: Sun, 5 Jul 2020 18:29:29 +0200
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 (email@hidden)
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:
This email sent to email@hidden