Init webview2 window on constuct

This commit is contained in:
Mihail Slobodyanuk 2022-12-19 13:22:26 +02:00
parent 99e7bfa71c
commit bf64987a4a

View file

@ -46,7 +46,16 @@ const (
// New creates a new webview in a new window. // New creates a new webview in a new window.
func New(debug bool) WebView { func New(debug bool) WebView {
return webview2.New(debug) //return webview2.New(debug)
return webview2.NewWithOptions(webview2.WebViewOptions{
Debug: debug,
WindowOptions: webview2.WindowOptions{
IconId: 128,
Title: "RiV-mesh",
Width: 706,
Height: 960,
},
})
} }
// NewWindow creates a new webview using an existing window. // NewWindow creates a new webview using an existing window.