The icon in the status bar will not appear. This code should solve the issue.
- (void)drawRect:(NSRect)dirtyRect{
[self.statusItem drawStatusBarBackgroundInRect:dirtyRect withHighlight:self.isActive];
NSImage *icon = self.isActive ? self.alternateImage : self.image;
NSSize iconSize = [icon size];
NSRect bounds = self.bounds;
CGFloat iconX = roundf((NSWidth(bounds) - iconSize.width) / 2);
CGFloat iconY = roundf((NSHeight(bounds) - iconSize.height) / 2);
NSPoint iconPoint = NSMakePoint(iconX, iconY);
[icon drawAtPoint:iconPoint fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
}
In addition I would change the declaration of the private interface. I saw this code in PR #7
The icon in the status bar will not appear. This code should solve the issue.
In addition I would change the declaration of the private interface. I saw this code in PR #7