docs: update window customization tutorial (#43661)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
This commit is contained in:
trop[bot] 2024-09-10 10:12:11 +02:00 committed by GitHub
parent f292be6630
commit 54899c3b4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -97,7 +97,7 @@ The [Window Controls Overlay API][] is a web standard that gives web apps the ab
customize their title bar region when installed on desktop. Electron exposes this API customize their title bar region when installed on desktop. Electron exposes this API
through the `BrowserWindow` constructor option `titleBarOverlay`. through the `BrowserWindow` constructor option `titleBarOverlay`.
This option only works whenever a custom `titlebarStyle` is applied on macOS or Windows. This option only works whenever a custom `titlebarStyle` is applied.
When `titleBarOverlay` is enabled, the window controls become exposed in their default When `titleBarOverlay` is enabled, the window controls become exposed in their default
position, and DOM elements cannot use the area underneath this region. position, and DOM elements cannot use the area underneath this region.
@ -107,7 +107,6 @@ Specifying `true` on either platform will result in an overlay region with defau
system colors: system colors:
```js title='main.js' ```js title='main.js'
// on macOS or Windows
const { BrowserWindow } = require('electron') const { BrowserWindow } = require('electron')
const win = new BrowserWindow({ const win = new BrowserWindow({
titleBarStyle: 'hidden', titleBarStyle: 'hidden',