mirror of
https://github.com/davidkaya/aryx.git
synced 2026-07-29 16:08:46 +02:00
fix: sync title bar overlay colors with app theme
The Windows title bar overlay (minimize/maximize/close buttons) was hardcoded to dark colors and did not update when switching themes. - Add titleBarTheme helper that maps AppearanceTheme to overlay and background colors, using nativeTheme for the system preference - Call applyTitleBarTheme from the setTheme IPC handler so the overlay updates immediately on theme change - Apply persisted theme on startup so the overlay matches from launch Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import { app, BrowserWindow } from 'electron';
|
||||
import { registerIpcHandlers } from '@main/ipc/registerIpcHandlers';
|
||||
import { EryxAppService } from '@main/EryxAppService';
|
||||
import { createMainWindow } from '@main/windows/createMainWindow';
|
||||
import { applyTitleBarTheme } from '@main/windows/titleBarTheme';
|
||||
|
||||
let mainWindow: BrowserWindow | undefined;
|
||||
let appService: EryxAppService | undefined;
|
||||
@@ -13,6 +14,10 @@ async function bootstrap(): Promise<void> {
|
||||
mainWindow = createMainWindow();
|
||||
registerIpcHandlers(mainWindow, appService);
|
||||
|
||||
// Apply persisted theme to the title bar overlay
|
||||
const workspace = await appService.loadWorkspace();
|
||||
applyTitleBarTheme(mainWindow, workspace.settings.theme);
|
||||
|
||||
if (!app.isPackaged) {
|
||||
mainWindow.webContents.openDevTools({ mode: 'detach' });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user