Fix menubar icon for macOS #767
2 changed files with 9 additions and 1 deletions
10
app/main.js
10
app/main.js
|
@ -226,7 +226,15 @@ function createWindow () {
|
||||||
function createTray () {
|
function createTray () {
|
||||||
// Minimize to tray logic follows:
|
// Minimize to tray logic follows:
|
||||||
// Set the tray icon
|
// Set the tray icon
|
||||||
const iconPath = path.join(app.getAppPath(), "/dist/img/fav/32x32.png");
|
let iconPath;
|
||||||
|
if (process.platform === 'darwin') {
|
||||||
|
// Using @2x for mac retina screens so the icon isn't blurry
|
||||||
|
|||||||
|
// file name needs to include "Template" at the end for dark menu bar
|
||||||
|
iconPath = path.join(app.getAppPath(), "/dist/img/fav/macTemplate@2x.png");
|
||||||
|
} else {
|
||||||
|
iconPath = path.join(app.getAppPath(), "/dist/img/fav/32x32.png");
|
||||||
|
}
|
||||||
|
|
||||||
tray = new Tray(iconPath);
|
tray = new Tray(iconPath);
|
||||||
tray.setToolTip("LBRY App");
|
tray.setToolTip("LBRY App");
|
||||||
tray.setTitle("LBRY");
|
tray.setTitle("LBRY");
|
||||||
|
|
BIN
ui/dist/img/fav/macTemplate@2x.png
vendored
Normal file
BIN
ui/dist/img/fav/macTemplate@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Loading…
Reference in a new issue
https://gist.github.com/lyoshenka/0a43205aa9a072b196ff87e2c689a8b9#gistcomment-2264825