add theme choice to settings dialog

This commit is contained in:
Drew Weymouth
2023-05-03 17:32:36 -07:00
parent a1d91d748c
commit 4ed6a75778
4 changed files with 42 additions and 5 deletions
+2 -1
View File
@@ -315,7 +315,7 @@ func (c *Controller) ShowAboutDialog() {
pop.Show()
}
func (c *Controller) ShowSettingsDialog() {
func (c *Controller) ShowSettingsDialog(themeUpdateCallbk func()) {
devs, err := c.App.Player.ListAudioDevices()
if err != nil {
log.Printf("error listing audio devices: %v", err)
@@ -332,6 +332,7 @@ func (c *Controller) ShowSettingsDialog() {
dlg.OnAudioDeviceSettingChanged = func() {
c.App.Player.SetAudioDevice(c.App.Config.LocalPlayback.AudioDeviceName)
}
dlg.OnThemeSettingChanged = themeUpdateCallbk
pop := widget.NewModalPopUp(dlg, c.MainWindow.Canvas())
dlg.OnDismiss = func() {
pop.Hide()