Fix pixelated/blurry icons on Windows

Close #66, #98
Side effect: Electron's icon appears on `npm run watch`
This commit is contained in:
Yuya Ochiai
2016-06-06 23:30:51 +09:00
parent 180428e3d5
commit 709f8363ed
10 changed files with 943 additions and 5 deletions

View File

@@ -57,9 +57,9 @@ const trayImages = function() {
switch (process.platform) {
case 'win32':
return {
normal: nativeImage.createFromPath(path.resolve(__dirname, 'resources/tray.png')),
unread: nativeImage.createFromPath(path.resolve(__dirname, 'resources/tray_unread.png')),
mention: nativeImage.createFromPath(path.resolve(__dirname, 'resources/tray_mention.png'))
normal: nativeImage.createFromPath(path.resolve(__dirname, 'resources/windows/tray.ico')),
unread: nativeImage.createFromPath(path.resolve(__dirname, 'resources/windows/tray_unread.ico')),
mention: nativeImage.createFromPath(path.resolve(__dirname, 'resources/windows/tray_mention.ico'))
};
case 'darwin':
return {
@@ -224,8 +224,7 @@ app.on('ready', function() {
// follow Electron's defaults
window_options = {};
}
if (process.platform === 'win32' || process.platform === 'linux') {
// On HiDPI Windows environment, the taskbar icon is pixelated. So this line is necessary.
if (process.platform === 'linux') {
window_options.icon = path.resolve(__dirname, 'resources/appicon.png');
}
window_options.title = app.getName();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 735 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 715 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB