save shuffle state in config
This commit is contained in:
+1
-1
@@ -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) })
|
||||
})
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user