5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-06 02:41:28 +08:00

[v3 mac] DisableWindowShadow -> DisableShadow

This commit is contained in:
Lea Anthony 2023-05-17 08:13:05 +10:00
parent f210357bfe
commit 39c834b83f
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405
4 changed files with 13 additions and 13 deletions

View File

@ -32,7 +32,7 @@ Webview Window Interface Methods
| close() | | | Y | |
| destroy() | | | Y | |
| execJS(js string) | | | Y | |
| focus() | Y | | | |
| focus() | Y | | Y | |
| forceReload() | | | Y | |
| fullscreen() | Y | | Y | |
| getScreen() (*Screen, error) | | | Y | |
@ -126,7 +126,7 @@ Webview Window Interface Methods
| Size | Y | | Y | |
| SetPosition | Y | | Y | |
| Position | Y | | Y | |
| Focus | Y | | | |
| Focus | Y | | Y | |
| FullScreen | Y | | Y | |
| UnFullscreen | Y | | Y | |
| Minimise | Y | | Y | |
@ -287,9 +287,9 @@ Built-in plugin support:
### Mac Options
| Feature | Default | Notes |
|-------------------------|-------------------|------------------------------------------------------|
|-------------------|-------------------|------------------------------------------------------|
| Backdrop | MacBackdropNormal | Standard solid window |
| DisableWindowShadow | false | |
| DisableShadow | false | |
| TitleBar | | Standard window decorations by default |
| Appearance | DefaultAppearance | |
| InvisibleTitleBarHeight | 0 | Creates an invisible title bar for frameless windows |

View File

@ -275,7 +275,7 @@ func main() {
})
app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
Mac: application.MacWindow{
DisableWindowShadow: true,
DisableShadow: true,
},
})

View File

@ -44,7 +44,7 @@ const (
// MacWindow contains macOS specific options
type MacWindow struct {
Backdrop MacBackdrop
DisableWindowShadow bool
DisableShadow bool
TitleBar MacTitleBar
Appearance MacAppearanceType
InvisibleTitleBarHeight int

View File

@ -820,7 +820,7 @@ type macosWebviewWindow struct {
}
func (w *macosWebviewWindow) focus() {
//TODO implement me
w.show()
}
func (w *macosWebviewWindow) openContextMenu(menu *Menu, data *ContextMenuData) {
@ -1176,12 +1176,12 @@ func (w *macosWebviewWindow) run() {
}
if w.parent.options.Hidden == false {
C.windowShow(w.nsWindow)
w.setHasShadow(!w.parent.options.Mac.DisableWindowShadow)
w.setHasShadow(!w.parent.options.Mac.DisableShadow)
} else {
// We have to wait until the window is shown before we can remove the shadow
var cancel func()
cancel = w.parent.On(events.Mac.WindowDidBecomeKey, func(_ *WindowEventContext) {
w.setHasShadow(!w.parent.options.Mac.DisableWindowShadow)
w.setHasShadow(!w.parent.options.Mac.DisableShadow)
cancel()
})
}