refactor: make autoHideMenuBar a property on BrowserWindows (#18555)
This commit is contained in:
parent
4cb6be453a
commit
52c76d737a
5 changed files with 31 additions and 5 deletions
|
@ -1470,10 +1470,14 @@ menu bar will only show when users press the single `Alt` key.
|
|||
If the menu bar is already visible, calling `setAutoHideMenuBar(true)` won't
|
||||
hide it immediately.
|
||||
|
||||
**[Deprecated](modernization/property-updates.md)**
|
||||
|
||||
#### `win.isMenuBarAutoHide()`
|
||||
|
||||
Returns `Boolean` - Whether menu bar automatically hides itself.
|
||||
|
||||
**[Deprecated](modernization/property-updates.md)**
|
||||
|
||||
#### `win.setMenuBarVisibility(visible)` _Windows_ _Linux_
|
||||
|
||||
* `visible` Boolean
|
||||
|
@ -1642,6 +1646,13 @@ removed in future Electron releases.
|
|||
|
||||
### Properties
|
||||
|
||||
#### `win.autoHideMenuBar`
|
||||
|
||||
A `Boolean` property that determines whether the window menu bar should hide itself automatically. Once set, the menu bar will only show when users press the single `Alt` key.
|
||||
|
||||
If the menu bar is already visible, setting this property to `true` won't
|
||||
hide it immediately.
|
||||
|
||||
#### `win.excludedFromShownWindowsMenu` _macOS_
|
||||
|
||||
A `Boolean` property that determines whether the window is excluded from the application’s Windows menu. `false` by default.
|
||||
|
|
|
@ -22,7 +22,6 @@ The Electron team is currently undergoing an initiative to convert separate gett
|
|||
* `title`
|
||||
* `documentEdited`
|
||||
* `hasShadow`
|
||||
* `autohideMenuBar`
|
||||
* `menubarVisible`
|
||||
* `visibleOnAllWorkspaces`
|
||||
* `crashReporter` module
|
||||
|
@ -54,6 +53,8 @@ The Electron team is currently undergoing an initiative to convert separate gett
|
|||
* `applicationMenu`
|
||||
* `badgeCount`
|
||||
* `name`
|
||||
* `BrowserWindow` module
|
||||
* `autohideMenuBar`
|
||||
* `NativeImage`
|
||||
* `isMacTemplateImage`
|
||||
* `SystemPreferences` module
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue