mirror of
				https://github.com/smartfrigde/armcord.git
				synced 2024-08-14 23:56:58 +00:00 
			
		
		
		
	Change default tray icon for macOS to avoid issues
This commit is contained in:
		
							parent
							
								
									c6e2244ce8
								
							
						
					
					
						commit
						8d85591e1c
					
				
					 3 changed files with 6 additions and 1 deletions
				
			
		
							
								
								
									
										
											BIN
										
									
								
								assets/16.png
									
										
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/16.png
									
										
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 1.1 KiB | 
							
								
								
									
										
											BIN
										
									
								
								assets/macos.png
									
										
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/macos.png
									
										
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 1.1 KiB | 
|  | @ -3,8 +3,13 @@ import {mainWindow} from "./window"; | ||||||
| import {getConfig} from "./utils"; | import {getConfig} from "./utils"; | ||||||
| import * as path from "path"; | import * as path from "path"; | ||||||
| import {createSettingsWindow} from "./settings/main"; | import {createSettingsWindow} from "./settings/main"; | ||||||
|  | import {platform} from "process"; | ||||||
| let tray: any = null; | let tray: any = null; | ||||||
|  | let defaultIcon = "ac_plug_colored"; | ||||||
| app.whenReady().then(async () => { | app.whenReady().then(async () => { | ||||||
|  |     if (platform == "darwin") { | ||||||
|  |         defaultIcon = "macos" | ||||||
|  |     } | ||||||
|     if ((await getConfig("windowStyle")) == "discord") { |     if ((await getConfig("windowStyle")) == "discord") { | ||||||
|         tray = new Tray(path.join(__dirname, "../", "/assets/dsc-tray.png")); |         tray = new Tray(path.join(__dirname, "../", "/assets/dsc-tray.png")); | ||||||
|         const contextMenu = Menu.buildFromTemplate([ |         const contextMenu = Menu.buildFromTemplate([ | ||||||
|  | @ -25,7 +30,7 @@ app.whenReady().then(async () => { | ||||||
|         tray.setToolTip("Discord"); |         tray.setToolTip("Discord"); | ||||||
|         tray.setContextMenu(contextMenu); |         tray.setContextMenu(contextMenu); | ||||||
|     } else { |     } else { | ||||||
|         var trayIcon = (await getConfig("trayIcon")) ?? "ac_plug_colored"; |         var trayIcon = (await getConfig("trayIcon")) ?? defaultIcon; | ||||||
|         tray = new Tray(path.join(__dirname, "../", `/assets/${trayIcon}.png`)); |         tray = new Tray(path.join(__dirname, "../", `/assets/${trayIcon}.png`)); | ||||||
|         const contextMenu = Menu.buildFromTemplate([ |         const contextMenu = Menu.buildFromTemplate([ | ||||||
|             { |             { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue