feat: update go program template

This commit is contained in:
misitebao 2021-09-09 05:17:10 +08:00
parent d563be5f1a
commit 243d05a976
2 changed files with 5 additions and 3 deletions

View File

@ -25,6 +25,7 @@ func (b *App) startup(ctx context.Context) {
} }
// shutdown is called at application termination // shutdown is called at application termination
// 在应用程序终止时被调用
func (b *App) shutdown(ctx context.Context) { func (b *App) shutdown(ctx context.Context) {
// Perform your teardown here // Perform your teardown here
} }

View File

@ -17,14 +17,15 @@ var assets embed.FS
func main() { func main() {
// Create application with options // Create application with options
// 使用选项创建应用
app := NewApp() app := NewApp()
err := wails.Run(&options.App{ err := wails.Run(&options.App{
Title: "{{.ProjectName}}", Title: "{{.ProjectName}}",
Width: 1600, Width: 1600,
Height: 1000, Height: 1000,
MinWidth: 400, MinWidth: 1400,
MinHeight: 400, MinHeight: 980,
MaxWidth: 2000, MaxWidth: 2000,
MaxHeight: 1500, MaxHeight: 1500,
DisableResize: false, DisableResize: false,
@ -35,7 +36,7 @@ func main() {
RGBA: 0x000000FF, RGBA: 0x000000FF,
Assets: assets, Assets: assets,
Windows: &windows.Options{ Windows: &windows.Options{
WebviewIsTransparent: false, WebviewIsTransparent: true,
WindowBackgroundIsTranslucent: false, WindowBackgroundIsTranslucent: false,
DisableWindowIcon: false, DisableWindowIcon: false,
}, },