MCPcopy Index your code
hub / github.com/21st-dev/1code / getUseNativeFramePreference

Function getUseNativeFramePreference

src/main/windows/main.ts:593–606  ·  view source on GitHub ↗

* Read window frame preference from settings file (Windows only) * Returns true if native frame should be used, false for frameless

()

Source from the content-addressed store, hash-verified

591 * Returns true if native frame should be used, false for frameless
592 */
593function getUseNativeFramePreference(): boolean {
594 if (process.platform !== "win32") return false
595
596 try {
597 const settingsPath = join(app.getPath("userData"), "window-settings.json")
598 if (existsSync(settingsPath)) {
599 const settings = JSON.parse(readFileSync(settingsPath, "utf-8"))
600 return settings.useNativeFrame === true
601 }
602 return false // Default: frameless (dark title bar)
603 } catch {
604 return false
605 }
606}
607
608/**
609 * Create a new application window

Callers 1

createWindowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected