Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(tray): adjust icon size for macOS platform compatibility

Orchard33a60fed8cac
diff --git a/electron/main.ts b/electron/main.ts
index 0f06f9e3e..2f2d971b7 100644
--- a/electron/main.ts
+++ b/electron/main.ts
@@ -62,10 +62,11 @@ let mainWindow: BrowserWindow | null = null;
let sourceSelectorWindow: BrowserWindow | null = null;
let tray: Tray | null = null;
let selectedSourceName = "";
+const isMac = process.platform === "darwin";
// Tray Icons
-const defaultTrayIcon = getTrayIcon("openscreen.png");
-const recordingTrayIcon = getTrayIcon("rec-button.png");
+const defaultTrayIcon = getTrayIcon("openscreen.png", isMac ? 18 : 24);
+const recordingTrayIcon = getTrayIcon("rec-button.png", isMac ? 18 : 24);
function createWindow() {
mainWindow = createHudOverlayWindow();
@@ -199,12 +200,12 @@ function createTray() {
});
}
-function getTrayIcon(filename: string) {
+function getTrayIcon(filename: string, size: number) {
return nativeImage
.createFromPath(path.join(process.env.VITE_PUBLIC || RENDERER_DIST, filename))
.resize({
- width: 24,
- height: 24,
+ width: size,
+ height: size,
quality: "best",
});
}
diff --git a/icons/icons/mac/icon.icns b/icons/icons/mac/icon.icns
index 7d5a493cb..02de106cf 100644
Binary files a/icons/icons/mac/icon.icns and b/icons/icons/mac/icon.icns differ