Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default Electron window and tray icons #10097

merged 3 commits into from Jun 18, 2019


Copy link

jryans commented Jun 18, 2019

This repairs the default window and tray icons so that they are working once again.

Prior to Riot 1.2.0 and #9616, we did not actually care about them very much, because the favico.js library that badges icons with the notification count would immediately create its own icon using a data URI and we would use that and any following versions it creates with different counts.

In #9616, we changed things to delay use of favico.js, which means the default icons are now used for the time window of app startup until the first notification arrives.

Fixes #9897

This fixes the fallback path which sets the Electron window icon to the default
icon in case there's no data URI based icon coming content. This is true
immediately after startup, for example.

Part of #9897
@jryans jryans requested a review from vector-im/riot-web Jun 18, 2019
@jryans jryans changed the title Fix default window and tray icons Fix default Electron window and tray icons Jun 18, 2019
@dbkr dbkr requested review from dbkr and removed request for vector-im/riot-web Jun 18, 2019
dbkr approved these changes Jun 18, 2019
Copy link

dbkr left a comment

otherwise lgtm

electron_app/src/electron-main.js Outdated Show resolved Hide resolved
jryans added 2 commits Jun 18, 2019
Electron doesn't seem to want to load icons from within `asar`s, so this changes
the default icons (used for window and tray) so that they are just regular files
on disk and updates the reference to match.

Part of #9897
This runtime PNG icon (the default window and tray icon) was not updated to
remove the white background when we last changed the branding. This copies a 265
px PNG from elsewhere to ensure it matches.

Part of #9897
@jryans jryans force-pushed the jryans/linux-icons branch from a43d5ac to f3bfb08 Jun 18, 2019
@jryans jryans merged commit b7a19c6 into develop Jun 18, 2019
4 checks passed
4 checks passed
buildkite/riot-web/pr Build #501 passed (2 minutes, 38 seconds)
buildkite/riot-web/pr/eslint-lint Passed (49 seconds)
buildkite/riot-web/pr/karma-tests Passed (2 minutes, 32 seconds)
buildkite/riot-web/pr/pipeline Passed (5 seconds)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.