Skip to content

Commit

Permalink
Change window icon to use hi-res png for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
minrwhite committed Nov 7, 2016
1 parent 0b217bc commit fd2bd11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Binary file added public/icon-256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ let mainWindow: Electron.BrowserWindow;
let trayIcon: Electron.Tray;
let trayMenu: Electron.Menu;

let windowIconPath: string;

if (process.platform === "linux") {
windowIconPath = `${__dirname}/icon-256.png`;
} else {
windowIconPath = `${__dirname}/superpowers.ico`;
}

/* tslint:disable */
const expectedElectronVersion = require(`${__dirname}/package.json`).superpowers.electron;
Expand Down Expand Up @@ -127,7 +134,7 @@ function setupTrayOrDock() {

function setupMainWindow() {
mainWindow = new electron.BrowserWindow({
width: 1000, height: 600, icon: `${__dirname}/superpowers.ico`,
width: 1000, height: 600, icon: windowIconPath,
minWidth: 800, minHeight: 480,
useContentSize: true, autoHideMenuBar: true,
show: false
Expand Down

0 comments on commit fd2bd11

Please sign in to comment.