@@ -167,8 +167,13 @@ protocol.registerSchemesAsPrivileged([
167167process . env . APP_ROOT = MAIN_DIST ;
168168process . env . VITE_PUBLIC = VITE_PUBLIC ;
169169
170- // Disable system theme
171- nativeTheme . themeSource = 'light' ;
170+ // Respect system theme on Windows, keep light theme on macOS for consistency
171+ const isWindows = process . platform === 'win32' ;
172+ if ( isWindows ) {
173+ nativeTheme . themeSource = 'system' ; // Respect Windows dark/light mode
174+ } else {
175+ nativeTheme . themeSource = 'light' ; // Keep existing behavior for macOS
176+ }
172177
173178// Set log level
174179log . transports . console . level = 'info' ;
@@ -1281,22 +1286,37 @@ async function createWindow() {
12811286 ) } `
12821287 ) ;
12831288
1289+ // Platform-specific window configuration
1290+ // Windows: Use native frame for better native feel, solid background
1291+ // macOS: Use frameless with transparency and vibrancy effects
12841292 win = new BrowserWindow ( {
12851293 title : 'Eigent' ,
12861294 width : 1200 ,
12871295 height : 800 ,
12881296 minWidth : 1050 ,
12891297 minHeight : 650 ,
1290- frame : false ,
1298+ // Use native frame on Windows for better native integration
1299+ frame : isWindows ? true : false ,
12911300 show : false , // Don't show until content is ready to avoid white screen
1292- transparent : true ,
1293- vibrancy : 'sidebar' ,
1294- visualEffectState : 'active' ,
1295- backgroundColor : '#f5f5f580' ,
1301+ // Only use transparency on macOS and Linux (not supported well on Windows)
1302+ transparent : ! isWindows ,
1303+ // macOS-only visual effects
1304+ vibrancy : isMac ? 'sidebar' : undefined ,
1305+ visualEffectState : isMac ? 'active' : undefined ,
1306+ // Solid background on Windows (respect dark/light mode), semi-transparent on macOS/Linux
1307+ backgroundColor : isWindows
1308+ ? ( nativeTheme . shouldUseDarkColors ? '#1e1e1e' : '#ffffff' )
1309+ : '#f5f5f580' ,
1310+ // macOS-specific title bar styling
12961311 titleBarStyle : isMac ? 'hidden' : undefined ,
12971312 trafficLightPosition : isMac ? { x : 10 , y : 10 } : undefined ,
12981313 icon : path . join ( VITE_PUBLIC , 'favicon.ico' ) ,
1299- roundedCorners : true ,
1314+ // Rounded corners on macOS and Linux (as original)
1315+ roundedCorners : ! isWindows ,
1316+ // Windows-specific options
1317+ ...( isWindows && {
1318+ autoHideMenuBar : true , // Hide menu bar on Windows for cleaner look
1319+ } ) ,
13001320 webPreferences : {
13011321 // Use a dedicated partition for main window to isolate from webviews
13021322 // This ensures main window's auth data (localStorage) is stored separately and persists across restarts
0 commit comments