mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-05 23:12:03 +08:00
[v3 mac] DisableWindowShadow -> DisableShadow
This commit is contained in:
parent
f210357bfe
commit
39c834b83f
16
v3/STATUS.md
16
v3/STATUS.md
@ -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 | |
|
||||
@ -286,12 +286,12 @@ Built-in plugin support:
|
||||
|
||||
### Mac Options
|
||||
|
||||
| Feature | Default | Notes |
|
||||
|-------------------------|-------------------|------------------------------------------------------|
|
||||
| Backdrop | MacBackdropNormal | Standard solid window |
|
||||
| DisableWindowShadow | false | |
|
||||
| TitleBar | | Standard window decorations by default |
|
||||
| Appearance | DefaultAppearance | |
|
||||
| Feature | Default | Notes |
|
||||
|-------------------|-------------------|------------------------------------------------------|
|
||||
| Backdrop | MacBackdropNormal | Standard solid window |
|
||||
| DisableShadow | false | |
|
||||
| TitleBar | | Standard window decorations by default |
|
||||
| Appearance | DefaultAppearance | |
|
||||
| InvisibleTitleBarHeight | 0 | Creates an invisible title bar for frameless windows |
|
||||
|
||||
|
||||
|
@ -275,7 +275,7 @@ func main() {
|
||||
})
|
||||
app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
|
||||
Mac: application.MacWindow{
|
||||
DisableWindowShadow: true,
|
||||
DisableShadow: true,
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user