Skip to content

Commit c3a8ad2

Browse files
erickzhaomalept
andauthored
docs: add window customization guide (#31054)
* docs: add window customization guide * fixes * Update docs/api/browser-window.md Co-authored-by: Mark Lee <[email protected]> * Update docs/api/browser-window.md Co-authored-by: Mark Lee <[email protected]> * Update docs/fiddles/windows/manage-windows/frameless-window/index.html Co-authored-by: Mark Lee <[email protected]> * Update docs/tutorial/window-customization.md Co-authored-by: Mark Lee <[email protected]> * Update docs/tutorial/window-customization.md Co-authored-by: Mark Lee <[email protected]> * Update docs/tutorial/window-customization.md Co-authored-by: Mark Lee <[email protected]> * Update docs/tutorial/window-customization.md Co-authored-by: Mark Lee <[email protected]> * Update docs/tutorial/window-customization.md Co-authored-by: Mark Lee <[email protected]> * Update docs/tutorial/window-customization.md Co-authored-by: Mark Lee <[email protected]> * Update docs/tutorial/window-customization.md Co-authored-by: Mark Lee <[email protected]> * Update docs/tutorial/window-customization.md Co-authored-by: Mark Lee <[email protected]> * Update docs/tutorial/window-customization.md Co-authored-by: Mark Lee <[email protected]> * Update docs/tutorial/window-customization.md Co-authored-by: Mark Lee <[email protected]> * Update docs/tutorial/window-customization.md Co-authored-by: Mark Lee <[email protected]> * fix code fence Co-authored-by: Mark Lee <[email protected]>
1 parent 7eaebe0 commit c3a8ad2

File tree

6 files changed

+281
-230
lines changed

6 files changed

+281
-230
lines changed

docs/api/browser-window.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ win.loadURL('https://github.com')
1717
win.loadFile('index.html')
1818
```
1919

20-
## Frameless window
20+
## Window customization
2121

22-
To create a window without chrome, or a transparent window in arbitrary shape,
23-
you can use the [Frameless Window](frameless-window.md) API.
22+
The `BrowserWindow` class exposes various ways to modify the look and behavior of
23+
your app's windows. For more details, see the [Window Customization](../tutorial/window-customization.md)
24+
tutorial.
2425

2526
## Showing the window gracefully
2627

@@ -184,7 +185,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
184185
`true`.
185186
* `paintWhenInitiallyHidden` Boolean (optional) - Whether the renderer should be active when `show` is `false` and it has just been created. In order for `document.visibilityState` to work correctly on first load with `show: false` you should set this to `false`. Setting this to `false` will cause the `ready-to-show` event to not fire. Default is `true`.
186187
* `frame` Boolean (optional) - Specify `false` to create a
187-
[Frameless Window](frameless-window.md). Default is `true`.
188+
[frameless window](../tutorial/window-customization.md#create-frameless-windows). Default is `true`.
188189
* `parent` BrowserWindow (optional) - Specify parent window. Default is `null`.
189190
* `modal` Boolean (optional) - Whether this is a modal window. This only works when the
190191
window is a child window. Default is `false`.
@@ -206,7 +207,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
206207
transparent) and 1.0 (fully opaque). This is only implemented on Windows and macOS.
207208
* `darkTheme` Boolean (optional) - Forces using dark theme for the window, only works on
208209
some GTK+3 desktop environments. Default is `false`.
209-
* `transparent` Boolean (optional) - Makes the window [transparent](frameless-window.md#transparent-window).
210+
* `transparent` Boolean (optional) - Makes the window [transparent](../tutorial/window-customization.md#create-transparent-windows).
210211
Default is `false`. On Windows, does not work unless the window is frameless.
211212
* `type` String (optional) - The type of window, default is normal window. See more about
212213
this below.

docs/api/frameless-window.md

Lines changed: 0 additions & 221 deletions
This file was deleted.

docs/fiddles/windows/manage-windows/frameless-window/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ <h2>Create a frameless window</h2>
5959

6060
<p>
6161
For more details, see the
62-
<a href="https://electronjs.org/docs/api/frameless-window/">
63-
Frameless Window
62+
<a href="https://electronjs.org/docs/tutorial/window-customization/">
63+
Window Customization
64+
6465
</a>
6566
documentation.
6667
</p>

docs/tutorial/offscreen-rendering.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ the dirty area is passed to the `paint` event to be more efficient.
1717
losses with no benefits.
1818
* When nothing is happening on a webpage, no frames are generated.
1919
* An offscreen window is always created as a
20-
[Frameless Window](../api/frameless-window.md).
20+
[Frameless Window](../tutorial/window-customization.md)..
2121

2222
### Rendering Modes
2323

0 commit comments

Comments
 (0)