Fix #625: Allow customization of grid card size

This commit is contained in:
Drew Weymouth
2025-05-28 09:21:24 -07:00
parent af1ae4641e
commit 0fd8b4621b
7 changed files with 49 additions and 4 deletions
+7
View File
@@ -36,6 +36,8 @@ const (
var (
ErrNoServers = errors.New("no servers set up")
ErrAnotherInstance = errors.New("another instance is running")
appInstance *App
)
type App struct {
@@ -204,9 +206,14 @@ func StartupApp(appName, displayAppName, appVersion, appVersionTag, latestReleas
a.startConfigWriter(a.bgrndCtx)
appInstance = a
return a, nil
}
func AppInstance() *App {
return appInstance
}
func (a *App) IsFirstLaunch() bool {
return a.isFirstLaunch
}
+8
View File
@@ -89,6 +89,10 @@ type FavoritesPageConfig struct {
ShowAlbumYears bool
}
type GridViewConfig struct {
CardSize float32
}
type PlaylistPageConfig struct {
TracklistColumns []string
}
@@ -154,6 +158,7 @@ type Config struct {
ArtistPage ArtistPageConfig
ArtistsPage ArtistsPageConfig
FavoritesPage FavoritesPageConfig
GridView GridViewConfig
PlaylistPage PlaylistPageConfig
PlaylistsPage PlaylistsPageConfig
TracksPage TracksPageConfig
@@ -215,6 +220,9 @@ func DefaultConfig(appVersionTag string) *Config {
InitialView: "Albums",
ShowAlbumYears: false,
},
GridView: GridViewConfig{
CardSize: 200,
},
PlaylistPage: PlaylistPageConfig{
TracklistColumns: []string{"Album", "Time", "Plays"},
},