Skip to content

Commit

Permalink
Use a template image for the menubar icon
Browse files Browse the repository at this point in the history
  • Loading branch information
romeovs committed May 17, 2021
1 parent 688dbdb commit f6469c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ function makeWindow(): BrowserWindow {
}

function makeTray(): Tray {
const icon = nativeImage.createFromPath(path.resolve(__dirname, menubar)).resize({ width: 16, height: 16 })
const filename = path.resolve(__dirname, menubar)
const icon = nativeImage.createFromPath(filename).resize({ width: 16, height: 16 })
icon.setTemplateImage(true)
return new Tray(icon)
}

Expand Down
Binary file modified src/logo-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f6469c1

Please sign in to comment.