Update icons to the new Repeat ones

This commit is contained in:
Michael Manganiello
2023-06-20 23:51:04 -03:00
parent 196f7f2cff
commit a40ba5eb79
2 changed files with 8 additions and 4 deletions
+2
View File
@@ -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 -4
View File
@@ -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()
}