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

chore: add tray icon resolutions #1676

Merged
merged 14 commits into from Aug 17, 2018
Merged

chore: add tray icon resolutions #1676

merged 14 commits into from Aug 17, 2018

Conversation

AndyLnd
Copy link
Contributor

@AndyLnd AndyLnd commented Aug 16, 2018

No description provided.

this.lastUnreadCount = 0;
}

initTray(hasOverlaySupport, trayIcon = new Tray(nativeImage.createEmpty())) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why moving this part to another method? This creates temporal coupling (the consumer now has to call the methods in the right order else he will have unexpected behaviors)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want the consumer to decide if he/she wants to have a tray icon or not. That's why it got decoupled.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very valid point!

@bennycode
Copy link
Contributor

bennycode commented Aug 17, 2018

Changes

  1. Before this PR we used *.ico files for Windows and *.png files for all other platforms. Now only *.png is being used (also on Windows).
  2. Tray icons are now available in 11 different resolutions to support high-DPI screens.
  3. Tray icons are now organized in separate directories.
  4. Since all platforms are using *.png images, we have less platform-specific differences in handling the tray icon. The only difference now is that Windows supports taskbar overlays.
  5. updateBadgeIcon has been renamed to showUnreadCount because it does more than just updating the icon. That's why showUnreadCount now internally calls three different methods.

Copy link
Contributor

@atomrc atomrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bennycode bennycode merged commit 3295d1e into master Aug 17, 2018
@bennycode bennycode deleted the chore/tray-icons branch August 17, 2018 13:57
@radarlog
Copy link

icons scaling probably does not work in Cinnamon (Manjaro Linux). The default img/tray-icon/tray/tray.png icon is using at HiDPI resolutions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants