window size saved to config, smaller font in track-list

This commit is contained in:
2026-02-16 03:48:53 -05:00
parent f97e8c4840
commit 6fbe16a84b
5 changed files with 271 additions and 198 deletions
+33
View File
@@ -0,0 +1,33 @@
package config
const (
// DefaultWidth is the default window width in pixels.
DefaultWidth = 512
// DefaultHeight is the default window height in pixels.
DefaultHeight = 384
)
// WindowConfig holds window size preferences.
type WindowConfig struct {
Width int `toml:"Width"`
Height int `toml:"Height"`
}
// NewDefaultWindowConfig returns a WindowConfig with sensible defaults.
func NewDefaultWindowConfig() *WindowConfig {
return &WindowConfig{
Width: DefaultWidth,
Height: DefaultHeight,
}
}
// applyDefaults fills in zero-value fields with defaults.
func (w *WindowConfig) applyDefaults() {
if w.Width <= 0 {
w.Width = DefaultWidth
}
if w.Height <= 0 {
w.Height = DefaultHeight
}
}