5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-04 01:31:54 +08:00

[windows] fix frameless resize

This commit is contained in:
Lea Anthony 2024-02-01 06:47:49 +11:00
parent 5670c1e655
commit 6e2bbe31ac
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405
2 changed files with 2 additions and 1 deletions

View File

@ -633,6 +633,7 @@ func (w *WebviewWindow) HandleMessage(message string) {
case message == "wails:runtime:ready":
w.emit(events.Common.WindowRuntimeReady)
w.runtimeLoaded = true
w.SetResizable(!w.options.DisableResize)
for _, js := range w.pendingJS {
w.ExecJS("", js)
}

View File

@ -139,7 +139,7 @@ func (w *windowsWebviewWindow) setURL(url string) {
func (w *windowsWebviewWindow) setResizable(resizable bool) {
w.setStyle(resizable, w32.WS_THICKFRAME)
w.execJS(fmt.Sprintf("window._wails.drag.resizable(%v);", resizable))
w.execJS(fmt.Sprintf("window._wails.setResizable(%v);", resizable))
}
func (w *windowsWebviewWindow) setMinSize(width, height int) {