mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-06 16:12:43 +08:00
[windows] fix frameless resize
This commit is contained in:
parent
5670c1e655
commit
6e2bbe31ac
@ -633,6 +633,7 @@ func (w *WebviewWindow) HandleMessage(message string) {
|
|||||||
case message == "wails:runtime:ready":
|
case message == "wails:runtime:ready":
|
||||||
w.emit(events.Common.WindowRuntimeReady)
|
w.emit(events.Common.WindowRuntimeReady)
|
||||||
w.runtimeLoaded = true
|
w.runtimeLoaded = true
|
||||||
|
w.SetResizable(!w.options.DisableResize)
|
||||||
for _, js := range w.pendingJS {
|
for _, js := range w.pendingJS {
|
||||||
w.ExecJS("", js)
|
w.ExecJS("", js)
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ func (w *windowsWebviewWindow) setURL(url string) {
|
|||||||
|
|
||||||
func (w *windowsWebviewWindow) setResizable(resizable bool) {
|
func (w *windowsWebviewWindow) setResizable(resizable bool) {
|
||||||
w.setStyle(resizable, w32.WS_THICKFRAME)
|
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) {
|
func (w *windowsWebviewWindow) setMinSize(width, height int) {
|
||||||
|
Loading…
Reference in New Issue
Block a user