fixes from PR review

This commit is contained in:
qm210 2024-12-07 03:12:02 +01:00
parent 6259f73d09
commit c59a7a8e35
2 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ func ReadCustomConfigYml(filename string, target interface{}) (exists bool, err
return true, err return true, err
} }
func NewPreferences() Preferences { func MakePreferences() Preferences {
preferences := loadDefaultPreferences() preferences := loadDefaultPreferences()
exists, err := ReadCustomConfigYml("preferences.yml", &preferences) exists, err := ReadCustomConfigYml("preferences.yml", &preferences)
if exists { if exists {

View File

@ -89,7 +89,7 @@ func NewTracker(model *tracker.Model) *Tracker {
Model: model, Model: model,
filePathString: model.FilePath().String(), filePathString: model.FilePath().String(),
preferences: NewPreferences(), preferences: MakePreferences(),
} }
t.Theme.Shaper = text.NewShaper(text.WithCollection(fontCollection)) t.Theme.Shaper = text.NewShaper(text.WithCollection(fontCollection))
t.PopupAlert = NewPopupAlert(model.Alerts(), t.Theme.Shaper) t.PopupAlert = NewPopupAlert(model.Alerts(), t.Theme.Shaper)
@ -173,7 +173,7 @@ func (t *Tracker) newWindow() *app.Window {
w.Option(app.Title("Sointu Tracker")) w.Option(app.Title("Sointu Tracker"))
w.Option(app.Size(t.preferences.WindowSize())) w.Option(app.Size(t.preferences.WindowSize()))
if t.preferences.Window.Maximized { if t.preferences.Window.Maximized {
w.Option(app.Fullscreen.Option()) w.Option(app.Maximized.Option())
} }
return w return w
} }