Merge pull request #10097 from vector-im/jryans/linux-icons
Fix default Electron window and tray icons
This commit is contained in:
commit
b7a19c6d16
Binary file not shown.
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 13 KiB |
|
@ -295,7 +295,10 @@ app.on('ready', () => {
|
|||
console.log('No update_base_url is defined: auto update is disabled');
|
||||
}
|
||||
|
||||
const iconPath = `${__dirname}/../img/riot.${process.platform === 'win32' ? 'ico' : 'png'}`;
|
||||
// It's important to call `path.join` so we don't end up with the packaged
|
||||
// asar in the final path.
|
||||
const iconFile = `riot.${process.platform === 'win32' ? 'ico' : 'png'}`;
|
||||
const iconPath = path.join(__dirname, "..", "..", "img", iconFile);
|
||||
|
||||
// Load the previous window state with fallback to defaults
|
||||
const mainWindowState = windowStateKeeper({
|
||||
|
|
|
@ -65,7 +65,7 @@ exports.create = function(config) {
|
|||
global.mainWindow.webContents.on('page-favicon-updated', async function(ev, favicons) {
|
||||
if (!favicons || favicons.length <= 0 || !favicons[0].startsWith('data:')) {
|
||||
if (lastFavicon !== null) {
|
||||
win.setIcon(defaultIcon);
|
||||
global.mainWindow.setIcon(defaultIcon);
|
||||
trayIcon.setImage(defaultIcon);
|
||||
lastFavicon = null;
|
||||
}
|
||||
|
|
|
@ -156,10 +156,10 @@
|
|||
"electronVersion": "4.2.4",
|
||||
"files": [
|
||||
"node_modules/**",
|
||||
"src/**",
|
||||
"img/**"
|
||||
"src/**"
|
||||
],
|
||||
"extraResources": [
|
||||
{ "from": "electron_app/img", "to": "img" },
|
||||
"webapp/**/*",
|
||||
"origin_migrator/**/*"
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue