5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 18:10:48 +08:00
wails/v2/pkg/options/options.go
2020-09-24 05:57:32 +10:00

41 lines
727 B
Go

package options
import "github.com/wailsapp/wails/v2/pkg/options/mac"
// App contains options for creating the App
type App struct {
Title string
Width int
Height int
DisableResize bool
Fullscreen bool
Frameless bool
MinWidth int
MinHeight int
MaxWidth int
MaxHeight int
StartHidden bool
DevTools bool
Colour int
Mac *mac.Options
}
// MergeDefaults will set the minimum default values for an application
func (a *App) MergeDefaults() {
// Create a default title
if len(a.Title) == 0 {
a.Title = "My Wails App"
}
// Default width
if a.Width == 0 {
a.Width = 1024
}
// Default height
if a.Height == 0 {
a.Height = 768
}
}