5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 20:51:38 +08:00
wails/v2/pkg/options/options.go
2020-11-17 06:56:51 +11:00

37 lines
731 B
Go

package options
import (
"log"
"github.com/imdario/mergo"
"github.com/wailsapp/wails/v2/pkg/logger"
"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
MinWidth int
MinHeight int
MaxWidth int
MaxHeight int
StartHidden bool
DevTools bool
RGBA int
Mac *mac.Options
Logger logger.Logger `json:"-"`
LogLevel logger.LogLevel
}
// 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)
}
}