mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-28 03:10:24 -04:00
fixes from PR review
This commit is contained in:
parent
6259f73d09
commit
c59a7a8e35
@ -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 {
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user