hook custom themes up to Settings dialog

This commit is contained in:
Drew Weymouth
2023-06-20 18:33:37 -07:00
parent 4a399c51b7
commit 02cac23d9a
5 changed files with 57 additions and 32 deletions
+2 -2
View File
@@ -441,14 +441,14 @@ func (c *Controller) ShowAboutDialog() {
pop.Show()
}
func (c *Controller) ShowSettingsDialog(themeUpdateCallbk func()) {
func (c *Controller) ShowSettingsDialog(themeUpdateCallbk func(), themeFiles map[string]string) {
devs, err := c.App.Player.ListAudioDevices()
if err != nil {
log.Printf("error listing audio devices: %v", err)
devs = []player.AudioDevice{{Name: "auto", Description: "Autoselect device"}}
}
dlg := dialogs.NewSettingsDialog(c.App.Config, devs, c.MainWindow)
dlg := dialogs.NewSettingsDialog(c.App.Config, devs, themeFiles, c.MainWindow)
dlg.OnReplayGainSettingsChanged = func() {
c.App.PlaybackManager.SetReplayGainOptions(c.App.Config.ReplayGain)
}