Skip to content

Commit

Permalink
Better default for tray icon color
Browse files Browse the repository at this point in the history
  • Loading branch information
digimezzo committed Dec 29, 2023
1 parent f4fbb3b commit af422e4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 19 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.0.0-preview.22] - 2023-12-28
## [3.0.0-preview.22] - 2023-12-29

### Added

Expand All @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- More subtle page switching animation
- Smarter default colors for tray icon
- Updated Bulgarian translation
- Updated Vietnamese translation

Expand Down
20 changes: 12 additions & 8 deletions main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion main.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 11 additions & 9 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,20 @@ function getTrayIcon(): string {

const invertColor: boolean = settings.get('invertNotificationAreaIconColor');

if (nativeTheme.shouldUseDarkColors) {
if (invertColor) {
return path.join(globalAny.__static, os.platform() === 'win32' ? 'icons/tray_black.ico' : 'icons/tray_black.png');
if (os.platform() === 'win32') {
if (!invertColor) {
// Defaulting to black for Windows
return path.join(globalAny.__static, 'icons/tray_black.ico');
} else {
return path.join(globalAny.__static, os.platform() === 'win32' ? 'icons/tray_white.ico' : 'icons/tray_white.png');
return path.join(globalAny.__static, 'icons/tray_white.ico');
}
}

if (invertColor) {
return path.join(globalAny.__static, os.platform() === 'win32' ? 'icons/tray_white.ico' : 'icons/tray_white.png');
} else {
return path.join(globalAny.__static, os.platform() === 'win32' ? 'icons/tray_black.ico' : 'icons/tray_black.png');
if (!invertColor) {
// Defaulting to white for Linux
return path.join(globalAny.__static, 'icons/tray_white.png');
} else {
return path.join(globalAny.__static, 'icons/tray_black.png');
}
}
}

Expand Down

0 comments on commit af422e4

Please sign in to comment.