diff --git a/Sources/Linaris/FooterPage.xaml b/Sources/Linaris/FooterPage.xaml index 14ba795..ec8f9a3 100644 --- a/Sources/Linaris/FooterPage.xaml +++ b/Sources/Linaris/FooterPage.xaml @@ -15,12 +15,12 @@ - - + + - + diff --git a/Sources/Linaris/FooterPage.xaml.cs b/Sources/Linaris/FooterPage.xaml.cs index e79d555..35ec8da 100644 --- a/Sources/Linaris/FooterPage.xaml.cs +++ b/Sources/Linaris/FooterPage.xaml.cs @@ -32,6 +32,30 @@ public partial class FooterPage : ContentView, INotifyPropertyChanged } } + private string loopImage = "loop.png"; + + public string LoopImage + { + get => loopImage; + set + { + loopImage = value; + OnPropertyChanged(nameof(LoopImage)); + } + } + + private string shuffleImage = "rdm.png"; + + public string ShuffleImage + { + get => shuffleImage; + set + { + shuffleImage = value; + OnPropertyChanged(nameof(ShuffleImage)); + } + } + private double volume = 1; public double Volume @@ -162,11 +186,25 @@ public partial class FooterPage : ContentView, INotifyPropertyChanged public void ShuffleButton_Clicked(object sender, EventArgs e) { Manager.Shuffle(); + if (ShuffleImage == "rdm.png") + { + ShuffleImage = "rdm2.png"; + } else { + ShuffleImage = "rdm.png"; + } } public void LoopButton_Clicked(object sender, EventArgs e) { Manager.Loop(); + if (LoopImage == "loop.png") + { + LoopImage = "loop2.png"; + } + else + { + LoopImage = "loop.png"; + } } public void OnCompleted(object sender, EventArgs e) diff --git a/Sources/Linaris/LocalFilesPage.xaml.cs b/Sources/Linaris/LocalFilesPage.xaml.cs index d955453..5c8ea6c 100644 --- a/Sources/Linaris/LocalFilesPage.xaml.cs +++ b/Sources/Linaris/LocalFilesPage.xaml.cs @@ -265,6 +265,9 @@ public partial class LocalFilesPage : ContentPage } } + + // Others + private void Play(object sender, EventArgs e) { if (sender is Button button && button.BindingContext is CustomTitle customTitle) diff --git a/Sources/Linaris/PlaylistPage.xaml.cs b/Sources/Linaris/PlaylistPage.xaml.cs index 6b60d22..b4fa298 100644 --- a/Sources/Linaris/PlaylistPage.xaml.cs +++ b/Sources/Linaris/PlaylistPage.xaml.cs @@ -69,8 +69,11 @@ public partial class PlaylistPage : ContentPage if (musicElement != null) { if (Manager.CurrentPlaying == null) return; - string encodedFilePath = Manager.CurrentPlaying.Path.Replace(" ", "\\ "); - musicElement.Source = encodedFilePath; + musicElement.Source = Manager.CurrentPlaying.Path; + if (footer is FooterPage footerPage) + { + footerPage.ShuffleImage = "rdm2.png"; + } } } } diff --git a/Sources/Linaris/Resources/Images/loop2.png b/Sources/Linaris/Resources/Images/loop2.png new file mode 100644 index 0000000..275c215 Binary files /dev/null and b/Sources/Linaris/Resources/Images/loop2.png differ diff --git a/Sources/Linaris/Resources/Images/rdm2.png b/Sources/Linaris/Resources/Images/rdm2.png new file mode 100644 index 0000000..3aa1ff1 Binary files /dev/null and b/Sources/Linaris/Resources/Images/rdm2.png differ