Merge pull request #10097 from vector-im/jryans/linux-icons
Fix default Electron window and tray iconspull/10124/head
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');
|
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
|
// Load the previous window state with fallback to defaults
|
||||||
const mainWindowState = windowStateKeeper({
|
const mainWindowState = windowStateKeeper({
|
||||||
|
|
|
@ -65,7 +65,7 @@ exports.create = function(config) {
|
||||||
global.mainWindow.webContents.on('page-favicon-updated', async function(ev, favicons) {
|
global.mainWindow.webContents.on('page-favicon-updated', async function(ev, favicons) {
|
||||||
if (!favicons || favicons.length <= 0 || !favicons[0].startsWith('data:')) {
|
if (!favicons || favicons.length <= 0 || !favicons[0].startsWith('data:')) {
|
||||||
if (lastFavicon !== null) {
|
if (lastFavicon !== null) {
|
||||||
win.setIcon(defaultIcon);
|
global.mainWindow.setIcon(defaultIcon);
|
||||||
trayIcon.setImage(defaultIcon);
|
trayIcon.setImage(defaultIcon);
|
||||||
lastFavicon = null;
|
lastFavicon = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,10 +156,10 @@
|
||||||
"electronVersion": "4.2.4",
|
"electronVersion": "4.2.4",
|
||||||
"files": [
|
"files": [
|
||||||
"node_modules/**",
|
"node_modules/**",
|
||||||
"src/**",
|
"src/**"
|
||||||
"img/**"
|
|
||||||
],
|
],
|
||||||
"extraResources": [
|
"extraResources": [
|
||||||
|
{ "from": "electron_app/img", "to": "img" },
|
||||||
"webapp/**/*",
|
"webapp/**/*",
|
||||||
"origin_migrator/**/*"
|
"origin_migrator/**/*"
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue