5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 19:31:20 +08:00
wails/v2/pkg/options/options.go
Lea Anthony a5e909337e
Support TitleBar Default
Fixed merging defaults
2020-09-24 06:39:08 +10:00

35 lines
637 B
Go

package options
import (
"log"
"github.com/imdario/mergo"
"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() {
err := mergo.Merge(a, Default)
if err != nil {
log.Fatal(err)
}
}