save shuffle state in config

This commit is contained in:
Siiiiinth
2026-02-01 14:21:57 +01:00
parent 7302e4ebbd
commit e05542844a
5 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ func NewBottomPanel(pm *backend.PlaybackManager, im *backend.ImageManager, contr
pm.SeekFraction(f)
})
bp.AuxControls = widgets.NewAuxControls(pm.Volume(), pm.GetLoopMode(), pm.IsAutoplay())
bp.AuxControls = widgets.NewAuxControls(pm.Volume(), pm.GetLoopMode(), pm.IsAutoplay(), pm.IsShuffle())
pm.OnLoopModeChange(func(lm backend.LoopMode) {
fyne.Do(func() { bp.AuxControls.SetLoopMode(lm) })
})
+2 -1
View File
@@ -34,7 +34,7 @@ type AuxControls struct {
container *fyne.Container
}
func NewAuxControls(initialVolume int, initialLoopMode backend.LoopMode, initialAutoplay bool) *AuxControls {
func NewAuxControls(initialVolume int, initialLoopMode backend.LoopMode, initialAutoplay bool, initialShuffle bool) *AuxControls {
a := &AuxControls{
VolumeControl: NewVolumeControl(initialVolume),
shuffle: NewIconButton(myTheme.ShuffleIcon, nil),
@@ -44,6 +44,7 @@ func NewAuxControls(initialVolume int, initialLoopMode backend.LoopMode, initial
showQueue: NewIconButton(myTheme.PlayQueueIcon, nil),
}
a.shuffle.Highlighted = initialShuffle
a.shuffle.IconSize = IconButtonSizeSmaller
a.shuffle.SetToolTip(lang.L("Shuffle"))
a.shuffle.OnTapped = func() {