How to set app icon for Electron / Atom Shell App

前端 未结 9 1415
无人及你
无人及你 2020-11-29 17:00

How do you set the app icon for your Electron app?

I am trying BrowserWindow({icon:\'path/to/image.png\'}); but it does not work.

Do I need to p

9条回答
  •  自闭症患者
    2020-11-29 17:15

    Setting the icon property when creating the BrowserWindow only has an effect on Windows and Linux.

    To set the icon on OS X, you can use electron-packager and set the icon using the --icon switch.

    It will need to be in .icns format for OS X. There is an online icon converter which can create this file from your .png.

提交回复
热议问题