feature: added click handler to tray icon to focus/show tidal-hifi. fixes #193 #143

This commit is contained in:
Rick van Lieshout 2023-01-22 20:51:38 +01:00
parent 57b7f9148f
commit 0620d87d8b
2 changed files with 6 additions and 0 deletions

View File

@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Reverted icon path to `icon.png` instead of the hardcoded linux path.
- Add support to autoHide the menubar and showing it with the `alt` key.
- Move the quit command from the system sub-menu to the main menu
- Added single click focus/show on the tray icon
- Doesn't work on all platforms. Nothing I can do about that unfortunately!
## 4.3.1

View File

@ -11,6 +11,10 @@ trayModule.addTray = function (mainWindow, options = { icon: "" }) {
const menu = getMenu(mainWindow);
tray.setContextMenu(menu);
tray.on("click", function () {
mainWindow.isVisible() ? mainWindow.focus() : mainWindow.show();
});
};
trayModule.refreshTray = function (mainWindow) {