diff --git a/src/extensions/core/electronAdapter.ts b/src/extensions/core/electronAdapter.ts index 941982c44..678c4dc5a 100644 --- a/src/extensions/core/electronAdapter.ts +++ b/src/extensions/core/electronAdapter.ts @@ -39,14 +39,16 @@ import { electronAPI as getElectronAPI, isElectron } from '@/utils/envUtil' id: 'Comfy-Desktop.WindowStyle', category: ['Comfy-Desktop', 'General', 'Window Style'], name: 'Window Style', - tooltip: 'Choose custom option to hide the system title bar', + tooltip: "Custom: Replace the system title bar with ComfyUI's Top menu", type: 'combo', defaultValue: 'default', options: ['default', 'custom'], onChange: ( newValue: 'default' | 'custom', - oldValue: 'default' | 'custom' + oldValue?: 'default' | 'custom' ) => { + if (!oldValue) return + electronAPI.Config.setWindowStyle(newValue) onChangeRestartApp(newValue, oldValue)