Update icons to the new Repeat ones
This commit is contained in:
@@ -193,6 +193,8 @@ var (
|
||||
ShuffleIcon fyne.Resource
|
||||
TracksIcon fyne.Resource
|
||||
FilterIcon fyne.Resource = theme.NewThemedResource(res.ResFilterSvg)
|
||||
RepeatIcon fyne.Resource = theme.NewThemedResource(res.ResRepeatSvg)
|
||||
RepeatOneIcon fyne.Resource = theme.NewThemedResource(res.ResRepeatoneSvg)
|
||||
)
|
||||
|
||||
// MUST be called at startup!
|
||||
|
||||
@@ -6,6 +6,8 @@ import (
|
||||
"fyne.io/fyne/v2/layout"
|
||||
"fyne.io/fyne/v2/theme"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
|
||||
myTheme "github.com/dweymouth/supersonic/ui/theme"
|
||||
"github.com/dweymouth/supersonic/ui/util"
|
||||
)
|
||||
|
||||
@@ -41,7 +43,7 @@ func (b *miniButton) MinSize() fyne.Size {
|
||||
func NewAuxControls(initialVolume int) *AuxControls {
|
||||
a := &AuxControls{
|
||||
VolumeControl: NewVolumeControl(initialVolume),
|
||||
loop: newMiniButton(theme.MediaReplayIcon()),
|
||||
loop: newMiniButton(myTheme.RepeatIcon),
|
||||
}
|
||||
a.container = container.NewHBox(
|
||||
layout.NewSpacer(),
|
||||
@@ -68,13 +70,13 @@ func (a *AuxControls) OnChangeLoopMode(f func()) {
|
||||
func (a *AuxControls) SetLoopMode(mode string) {
|
||||
if mode == "all" {
|
||||
a.loop.Importance = widget.HighImportance
|
||||
a.loop.Icon = theme.MediaReplayIcon()
|
||||
a.loop.Icon = myTheme.RepeatIcon
|
||||
} else if mode == "one" {
|
||||
a.loop.Importance = widget.HighImportance
|
||||
a.loop.Icon = theme.MediaReplayIcon() // TODO: This icon must be changed to the "Repeat" one with a 1.
|
||||
a.loop.Icon = myTheme.RepeatOneIcon
|
||||
} else {
|
||||
a.loop.Importance = widget.MediumImportance
|
||||
a.loop.Icon = theme.MediaReplayIcon()
|
||||
a.loop.Icon = myTheme.RepeatIcon
|
||||
}
|
||||
a.loop.Refresh()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user