mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2025-01-06 06:28:33 +03:00
🐧 Set window icon, fixes #5281
This commit is contained in:
parent
2741445d95
commit
87c2f4496f
@ -10,6 +10,7 @@ module.exports =
|
|||||||
class AtomWindow
|
class AtomWindow
|
||||||
_.extend @prototype, EventEmitter.prototype
|
_.extend @prototype, EventEmitter.prototype
|
||||||
|
|
||||||
|
@iconPath: path.resolve(__dirname, '..', '..', 'resources', 'atom.png')
|
||||||
@includeShellLoadTime: true
|
@includeShellLoadTime: true
|
||||||
|
|
||||||
browserWindow: null
|
browserWindow: null
|
||||||
@ -22,12 +23,18 @@ class AtomWindow
|
|||||||
# Normalize to make sure drive letter case is consistent on Windows
|
# Normalize to make sure drive letter case is consistent on Windows
|
||||||
@resourcePath = path.normalize(@resourcePath) if @resourcePath
|
@resourcePath = path.normalize(@resourcePath) if @resourcePath
|
||||||
|
|
||||||
@browserWindow = new BrowserWindow
|
options =
|
||||||
show: false
|
show: false
|
||||||
title: 'Atom'
|
title: 'Atom'
|
||||||
'web-preferences':
|
'web-preferences':
|
||||||
'direct-write': false
|
'direct-write': false
|
||||||
'subpixel-font-scaling': false
|
'subpixel-font-scaling': false
|
||||||
|
# Don't set icon on Windows so the exe's ico will be used as window and
|
||||||
|
# taskbar's icon. See https://github.com/atom/atom/issues/4811 for more.
|
||||||
|
if process.platform is 'linux'
|
||||||
|
options.icon = @constructor.iconPath
|
||||||
|
|
||||||
|
@browserWindow = new BrowserWindow options
|
||||||
global.atomApplication.addWindow(this)
|
global.atomApplication.addWindow(this)
|
||||||
|
|
||||||
@handleEvents()
|
@handleEvents()
|
||||||
|
Loading…
Reference in New Issue
Block a user