Skip to content

Commit

Permalink
chore: Resize tray icons for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
truemiller committed May 9, 2024
1 parent d2ab157 commit 05be2c3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions electron/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,19 @@ const TRAY_ICONS = {
RUNNING: nativeImage.createFromPath(TRAY_ICONS_PATHS.RUNNING),
};

try {
if (process.platform === 'darwin') {
// resize icons for macOS
TRAY_ICONS.LOGGED_OUT = TRAY_ICONS.LOGGED_OUT.resize({
width: 16,
height: 16,
});
TRAY_ICONS.LOW_GAS = TRAY_ICONS.LOW_GAS.resize({ width: 16, height: 16 });
TRAY_ICONS.PAUSED = TRAY_ICONS.PAUSED.resize({ width: 16, height: 16 });
TRAY_ICONS.RUNNING = TRAY_ICONS.RUNNING.resize({ width: 16, height: 16 });
}
} catch (e) {
console.log('Error resizing tray icons', e);
}

module.exports = { TRAY_ICONS_PATHS, TRAY_ICONS };

0 comments on commit 05be2c3

Please sign in to comment.