Skip to content

Commit

Permalink
🐛 Fix: add new tray icon for macOS dark-mode
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #267
  • Loading branch information
Molunerfinn committed May 22, 2019
1 parent 5a06483 commit c5adf3b
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/main/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
'use strict'

import Uploader from './utils/uploader.js'
import { app, BrowserWindow, Tray, Menu, Notification, clipboard, ipcMain, globalShortcut, dialog } from 'electron'
import {
app,
BrowserWindow,
Tray,
Menu,
Notification,
clipboard,
ipcMain,
globalShortcut,
dialog,
systemPreferences
} from 'electron'
import db from '../datastore'
import beforeOpen from './utils/beforeOpen'
import pasteTemplate from './utils/pasteTemplate'
Expand Down Expand Up @@ -158,7 +169,11 @@ function createTray () {
})

tray.on('drag-enter', () => {
tray.setImage(`${__static}/upload.png`)
if (systemPreferences.isDarkMode()) {
tray.setImage(`${__static}/upload-dark.png`)
} else {
tray.setImage(`${__static}/upload.png`)
}
})

tray.on('drag-end', () => {
Expand Down
Binary file added static/upload-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 static/[email protected]
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 static/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/upload.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 static/[email protected]
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 static/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c5adf3b

Please sign in to comment.