aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMyles Horton2018-06-06 11:06:42 -0700
committerGitHub2018-06-06 11:06:42 -0700
commita9db7e378b5cb5ac8a5585ccd9b2a0ea1b7e033e (patch)
treeeb7ba33e7d7a83e2863189eaff3f50785080e6d9
parent9ddd647aedba71f782bef029a90964301de03480 (diff)
parent904c17e31e8a9012213d9674570ca036370d4a0e (diff)
downloadsystray-a9db7e378b5cb5ac8a5585ccd9b2a0ea1b7e033e.tar.bz2
Merge pull request #46 from stoggi/macos-template-icon
Use templated icons for the menu bar in macOS
-rw-r--r--systray_darwin.m1
1 files changed, 1 insertions, 0 deletions
diff --git a/systray_darwin.m b/systray_darwin.m
index f1dc7ac..5b3ddf9 100644
--- a/systray_darwin.m
+++ b/systray_darwin.m
@@ -159,6 +159,7 @@ void runInMainThread(SEL method, id object) {
void setIcon(const char* iconBytes, int length) {
NSData* buffer = [NSData dataWithBytes: iconBytes length:length];
NSImage *image = [[NSImage alloc] initWithData:buffer];
+ image.template = YES;
[image setSize:NSMakeSize(16, 16)];
runInMainThread(@selector(setIcon:), (id)image);
}