Skip to content

Commit

Permalink
tray icon colour update.
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Fraser committed Oct 8, 2018
1 parent d2520d2 commit d06cb65
Show file tree
Hide file tree
Showing 20 changed files with 5 additions and 5 deletions.
Binary file added assets/icons/menu-standard-dark-paused.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/menu-standard-dark-paused@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/menu-standard-dark-playing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/menu-standard-dark-playing@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/menu-standard-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/menu-standard-dark@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/menu-standard-light-paused.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/menu-standard-light-paused@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/menu-standard-light-playing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/menu-standard-light-playing@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/menu-standard-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/menu-standard-light@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/icons/menu-standard-paused.png
Binary file not shown.
Binary file removed assets/icons/menu-standard-paused@2x.png
Binary file not shown.
Binary file removed assets/icons/menu-standard-playing.png
Binary file not shown.
Binary file removed assets/icons/menu-standard-playing@2x.png
Binary file not shown.
Binary file removed assets/icons/menu-standard.png
Binary file not shown.
Binary file removed assets/icons/menu-standard@2x.png
Binary file not shown.
3 changes: 0 additions & 3 deletions assets/icons/menu.svg

This file was deleted.

7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ let loadingScreen
let mainWindow
let aboutScreen
let tray
let trayTheme
let status
let willQuitApp = false
let windowParams = {
Expand Down Expand Up @@ -135,7 +136,7 @@ function createMenu () {
}

function trayIcon () {
tray = new Tray(path.join(__dirname, 'assets/icons/menu-standard.png'))
tray = new Tray(path.join(__dirname, `assets/icons/menu-standard-${trayTheme}.png`))
tray.setToolTip('MusicTube Player')
tray.on('click', () => {
mainWindow.isVisible() ? mainWindow.hide() : mainWindow.show()
Expand Down Expand Up @@ -184,6 +185,8 @@ function skipOver () {

// Application ready to run
app.on('ready', () => {
trayTheme = (process.platform === 'darwin') ? 'dark' : 'light'

createLoadingWindow()
createWindow()
globalShortcuts()
Expand Down Expand Up @@ -213,5 +216,5 @@ ipcMain.on('player', (event, object) => {
})
}
status = JSON.stringify(object)
tray.setImage(path.join(__dirname, `assets/icons/menu-standard-${object.status.toLowerCase()}.png`))
tray.setImage(path.join(__dirname, `assets/icons/menu-standard-${trayTheme}-${object.status.toLowerCase()}.png`))
})

0 comments on commit d06cb65

Please sign in to comment.