diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/BetterLyrics.WinUI3.csproj b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/BetterLyrics.WinUI3.csproj
index 5ddf8eb..7ddadba 100644
--- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/BetterLyrics.WinUI3.csproj
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/BetterLyrics.WinUI3.csproj
@@ -23,11 +23,12 @@
-
+
+
@@ -37,6 +38,7 @@
+
@@ -292,7 +294,7 @@
-
+
MSBuild:Compile
@@ -334,6 +336,21 @@
+
+
+ MSBuild:Compile
+
+
+
+
+ MSBuild:Compile
+
+
+
+
+ MSBuild:Compile
+
+
MSBuild:Compile
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/AlbumArtAreaEffectSettingsControl.xaml b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/AlbumArtAreaEffectSettingsControl.xaml
new file mode 100644
index 0000000..f46859c
--- /dev/null
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/AlbumArtAreaEffectSettingsControl.xaml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/AlbumArtAreaEffectSettingsControl.xaml.cs b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/AlbumArtAreaEffectSettingsControl.xaml.cs
new file mode 100644
index 0000000..fb91ce4
--- /dev/null
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/AlbumArtAreaEffectSettingsControl.xaml.cs
@@ -0,0 +1,37 @@
+using BetterLyrics.WinUI3.Models.Settings;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace BetterLyrics.WinUI3.Controls;
+
+public sealed partial class AlbumArtAreaEffectSettingsControl : UserControl
+{
+ public static readonly DependencyProperty AlbumArtAreaEffectSettingsProperty =
+ DependencyProperty.Register(nameof(AlbumArtAreaEffectSettings), typeof(AlbumArtAreaEffectSettings), typeof(AlbumArtAreaEffectSettingsControl), new PropertyMetadata(default));
+
+ public AlbumArtAreaEffectSettings AlbumArtAreaEffectSettings
+ {
+ get => (AlbumArtAreaEffectSettings)GetValue(AlbumArtAreaEffectSettingsProperty);
+ set => SetValue(AlbumArtAreaEffectSettingsProperty, value);
+ }
+
+ public AlbumArtAreaEffectSettingsControl()
+ {
+ InitializeComponent();
+ }
+}
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/AlbumArtLayoutSettingsControl.xaml b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/AlbumArtAreaStyleSettingsControl.xaml
similarity index 98%
rename from BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/AlbumArtLayoutSettingsControl.xaml
rename to BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/AlbumArtAreaStyleSettingsControl.xaml
index 8dc51b8..db14de3 100644
--- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/AlbumArtLayoutSettingsControl.xaml
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/AlbumArtAreaStyleSettingsControl.xaml
@@ -1,6 +1,6 @@
(AlbumArtLayoutSettings)GetValue(AlbumArtLayoutSettingsProperty);
+ get => (AlbumArtAreaStyleSettings)GetValue(AlbumArtLayoutSettingsProperty);
set => SetValue(AlbumArtLayoutSettingsProperty, value);
}
- public AlbumArtLayoutSettingsControl()
+ public AlbumArtAreaStyleSettingsControl()
{
InitializeComponent();
}
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/ImageSwitcher.xaml b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/ImageSwitcher.xaml
new file mode 100644
index 0000000..1897b24
--- /dev/null
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/ImageSwitcher.xaml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/ImageSwitcher.xaml.cs b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/ImageSwitcher.xaml.cs
new file mode 100644
index 0000000..f1e6caa
--- /dev/null
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/ImageSwitcher.xaml.cs
@@ -0,0 +1,145 @@
+using BetterLyrics.WinUI3.Enums;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using System.Threading.Tasks;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace BetterLyrics.WinUI3.Controls;
+
+public sealed partial class ImageSwitcher : UserControl
+{
+ public int CornerRadiusAmount
+ {
+ get { return (int)GetValue(CornerRadiusAmountProperty); }
+ set { SetValue(CornerRadiusAmountProperty, value); }
+ }
+
+ public static readonly DependencyProperty CornerRadiusAmountProperty =
+ DependencyProperty.Register(nameof(CornerRadiusAmount), typeof(int), typeof(ImageSwitcher), new PropertyMetadata(0));
+
+ public int ShadowAmount
+ {
+ get { return (int)GetValue(ShadowAmountProperty); }
+ set { SetValue(ShadowAmountProperty, value); }
+ }
+
+ public static readonly DependencyProperty ShadowAmountProperty =
+ DependencyProperty.Register(nameof(ShadowAmount), typeof(int), typeof(ImageSwitcher), new PropertyMetadata(0));
+
+ public ImageSource? Source
+ {
+ get { return (ImageSource?)GetValue(SourceProperty); }
+ set { SetValue(SourceProperty, value); }
+ }
+
+ public static readonly DependencyProperty SourceProperty =
+ DependencyProperty.Register(nameof(Source), typeof(ImageSource), typeof(ImageSwitcher), new PropertyMetadata(null, OnDependencyPropertyChanged));
+
+ public ImageSwitchType SwitchType
+ {
+ get { return (ImageSwitchType)GetValue(SwitchTypeProperty); }
+ set { SetValue(SwitchTypeProperty, value); }
+ }
+
+ public static readonly DependencyProperty SwitchTypeProperty =
+ DependencyProperty.Register(nameof(SwitchType), typeof(ImageSwitchType), typeof(ImageSwitcher), new PropertyMetadata(ImageSwitchType.Crossfade));
+
+ public ImageSwitcher()
+ {
+ InitializeComponent();
+ }
+
+ private void UpdateSource()
+ {
+ switch (SwitchType)
+ {
+ case ImageSwitchType.Crossfade:
+ UpdateSourceCrossfade();
+ break;
+ case ImageSwitchType.Slide:
+ UpdateSourceSlide();
+ break;
+ default:
+ break;
+ }
+ }
+
+ private void UpdateSourceCrossfade()
+ {
+ // 为背景图片设置旧源
+ LastAlbumArtImage.Source = AlbumArtImage.Source;
+ // 使其立即可见
+ LastAlbumArtImage.TranslationTransition = null;
+ LastAlbumArtImage.OpacityTransition = null;
+ LastAlbumArtImage.Translation = new();
+ LastAlbumArtImage.Opacity = 1;
+ LastAlbumArtImage.OpacityTransition = new ScalarTransition { Duration = Constants.Time.AnimationDuration };
+
+ // 使前景图片立即不可见
+ AlbumArtImage.TranslationTransition = null;
+ AlbumArtImage.OpacityTransition = null;
+ AlbumArtImage.Translation = new();
+ AlbumArtImage.Opacity = 0;
+ AlbumArtImage.OpacityTransition = new ScalarTransition { Duration = Constants.Time.AnimationDuration };
+ // 之后为其设置新源
+ AlbumArtImage.Source = Source;
+
+ // 交叉淡出淡入
+ LastAlbumArtImage.Opacity = 0;
+ AlbumArtImage.Opacity = 1;
+ }
+
+ private void UpdateSourceSlide()
+ {
+ // 为背景图片设置旧源
+ LastAlbumArtImage.Source = AlbumArtImage.Source;
+ // 使其归位
+ LastAlbumArtImage.TranslationTransition = null;
+ LastAlbumArtImage.OpacityTransition = null;
+ LastAlbumArtImage.Translation = new();
+ LastAlbumArtImage.Opacity = 1;
+ LastAlbumArtImage.TranslationTransition = new Vector3Transition { Duration = Constants.Time.AnimationDuration };
+ LastAlbumArtImage.OpacityTransition = new ScalarTransition { Duration = Constants.Time.AnimationDuration };
+
+ // 使前景图片立即不可见
+ AlbumArtImage.TranslationTransition = null;
+ AlbumArtImage.OpacityTransition = null;
+ AlbumArtImage.Translation = new(-(float)ActualWidth, 0, 0);
+ AlbumArtImage.Opacity = 0;
+ AlbumArtImage.TranslationTransition = new Vector3Transition { Duration = Constants.Time.AnimationDuration };
+ AlbumArtImage.OpacityTransition = new ScalarTransition { Duration = Constants.Time.AnimationDuration };
+ // 之后为其设置新源
+ AlbumArtImage.Source = Source;
+
+ // 滑动
+ LastAlbumArtImage.Opacity = 0;
+ AlbumArtImage.Opacity = 1;
+ LastAlbumArtImage.Translation = new(-(float)ActualWidth, 0, 0);
+ AlbumArtImage.Translation = new();
+ }
+
+ private static void OnDependencyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ if (d is ImageSwitcher imageSwitcher)
+ {
+ if (e.Property == SourceProperty)
+ {
+ imageSwitcher.UpdateSource();
+ }
+ }
+ }
+}
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/LyricsWindowSettingsControl.xaml b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/LyricsWindowSettingsControl.xaml
index e1493bf..fbbe368 100644
--- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/LyricsWindowSettingsControl.xaml
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/LyricsWindowSettingsControl.xaml
@@ -162,7 +162,7 @@
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -411,7 +273,12 @@
-
+
+
+
+
+
+
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/ShadowImage.xaml b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/ShadowImage.xaml
index 2e06ac1..b4fdb9c 100644
--- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/ShadowImage.xaml
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/ShadowImage.xaml
@@ -18,7 +18,7 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
SizeChanged="ShadowCastGrid_SizeChanged">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/WindowSettingsControl.xaml.cs b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/WindowSettingsControl.xaml.cs
new file mode 100644
index 0000000..a2e4f35
--- /dev/null
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/WindowSettingsControl.xaml.cs
@@ -0,0 +1,56 @@
+using BetterLyrics.WinUI3.Hooks;
+using BetterLyrics.WinUI3.Models;
+using BetterLyrics.WinUI3.Models.Settings;
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace BetterLyrics.WinUI3.Controls;
+
+public sealed partial class WindowSettingsControl : UserControl
+{
+ public static readonly DependencyProperty LyricsWindowStatusProperty =
+ DependencyProperty.Register(nameof(LyricsWindowStatus), typeof(AlbumArtAreaEffectSettings), typeof(WindowSettingsControl), new PropertyMetadata(default));
+
+ public LyricsWindowStatus LyricsWindowStatus
+ {
+ get => (LyricsWindowStatus)GetValue(LyricsWindowStatusProperty);
+ set => SetValue(LyricsWindowStatusProperty, value);
+ }
+
+ public ObservableCollection MonitorDeviceNames { get; set; } = [];
+
+ public WindowSettingsControl()
+ {
+ InitializeComponent();
+ MonitorDeviceNames = [.. MonitorHook.GetAllMonitorDeviceNames()];
+ }
+
+ private void RefreshMonitorDeviceNames()
+ {
+ MonitorDeviceNames = [.. MonitorHook.GetAllMonitorDeviceNames()];
+ LyricsWindowStatus.MonitorDeviceName = MonitorDeviceNames.FirstOrDefault() ?? "";
+ }
+
+ private void RefreshMonitorButton_Click(object sender, RoutedEventArgs e)
+ {
+ RefreshMonitorDeviceNames();
+ }
+}
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Enums/ImageSwitchType.cs b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Enums/ImageSwitchType.cs
new file mode 100644
index 0000000..a452a00
--- /dev/null
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Enums/ImageSwitchType.cs
@@ -0,0 +1,12 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace BetterLyrics.WinUI3.Enums
+{
+ public enum ImageSwitchType
+ {
+ Crossfade,
+ Slide
+ }
+}
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/LyricsWindowStatus.cs b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/LyricsWindowStatus.cs
index 3807a51..fd585e6 100644
--- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/LyricsWindowStatus.cs
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/LyricsWindowStatus.cs
@@ -30,7 +30,8 @@ namespace BetterLyrics.WinUI3.Models
[ObservableProperty] public partial LyricsStyleSettings LyricsStyleSettings { get; set; } = new();
[ObservableProperty] public partial LyricsEffectSettings LyricsEffectSettings { get; set; } = new(500, 500, 500, EasingType.EaseInOutQuad);
[ObservableProperty][NotifyPropertyChangedRecipients] public partial LyricsBackgroundSettings LyricsBackgroundSettings { get; set; } = new();
- [ObservableProperty][NotifyPropertyChangedRecipients] public partial AlbumArtLayoutSettings AlbumArtLayoutSettings { get; set; } = new();
+ [ObservableProperty][NotifyPropertyChangedRecipients] public partial AlbumArtAreaStyleSettings AlbumArtLayoutSettings { get; set; } = new();
+ [ObservableProperty] public partial AlbumArtAreaEffectSettings AlbumArtAreaEffectSettings { get; set; } = new();
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsAdaptToEnvironment { get; set; } = false;
[ObservableProperty][NotifyPropertyChangedRecipients] public partial WindowPixelSampleMode EnvironmentSampleMode { get; set; } = WindowPixelSampleMode.WindowEdge;
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool AutoShowOrHideWindow { get; set; } = false;
@@ -65,7 +66,7 @@ namespace BetterLyrics.WinUI3.Models
newValue.PropertyChanged += OldLyricsBackgroundSettings_PropertyChanged;
}
- partial void OnAlbumArtLayoutSettingsChanged(AlbumArtLayoutSettings oldValue, AlbumArtLayoutSettings newValue)
+ partial void OnAlbumArtLayoutSettingsChanged(AlbumArtAreaStyleSettings oldValue, AlbumArtAreaStyleSettings newValue)
{
oldValue.PropertyChanged -= OldAlbumArtLayoutSettings_PropertyChanged;
newValue.PropertyChanged += OldAlbumArtLayoutSettings_PropertyChanged;
@@ -184,10 +185,13 @@ namespace BetterLyrics.WinUI3.Models
MonitorBounds = this.MonitorBounds,
DemoMonitorBounds = this.DemoMonitorBounds,
DockPlacement = this.DockPlacement,
+
LyricsStyleSettings = (LyricsStyleSettings)this.LyricsStyleSettings.Clone(),
LyricsEffectSettings = (LyricsEffectSettings)this.LyricsEffectSettings.Clone(),
LyricsBackgroundSettings = (LyricsBackgroundSettings)this.LyricsBackgroundSettings.Clone(),
- AlbumArtLayoutSettings = (AlbumArtLayoutSettings)this.AlbumArtLayoutSettings.Clone(),
+ AlbumArtLayoutSettings = (AlbumArtAreaStyleSettings)this.AlbumArtLayoutSettings.Clone(),
+ AlbumArtAreaEffectSettings = (AlbumArtAreaEffectSettings)this.AlbumArtAreaEffectSettings.Clone(),
+
IsAdaptToEnvironment = this.IsAdaptToEnvironment,
EnvironmentSampleMode = this.EnvironmentSampleMode,
AutoShowOrHideWindow = this.AutoShowOrHideWindow,
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/Settings/AlbumArtAreaEffectSettings.cs b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/Settings/AlbumArtAreaEffectSettings.cs
new file mode 100644
index 0000000..351ed99
--- /dev/null
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/Settings/AlbumArtAreaEffectSettings.cs
@@ -0,0 +1,21 @@
+锘縰sing BetterLyrics.WinUI3.Enums;
+using CommunityToolkit.Mvvm.ComponentModel;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace BetterLyrics.WinUI3.Models.Settings
+{
+ public partial class AlbumArtAreaEffectSettings : ObservableRecipient, ICloneable
+ {
+ [ObservableProperty][NotifyPropertyChangedRecipients] public partial ImageSwitchType ImageSwitchType { get; set; } = ImageSwitchType.Slide;
+
+ public object Clone()
+ {
+ return new AlbumArtAreaEffectSettings()
+ {
+ ImageSwitchType = this.ImageSwitchType,
+ };
+ }
+ }
+}
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/Settings/AlbumArtLayoutSettings.cs b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/Settings/AlbumArtAreaStyleSettings.cs
similarity index 92%
rename from BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/Settings/AlbumArtLayoutSettings.cs
rename to BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/Settings/AlbumArtAreaStyleSettings.cs
index faeb0f3..cfd9ef9 100644
--- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/Settings/AlbumArtLayoutSettings.cs
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/Settings/AlbumArtAreaStyleSettings.cs
@@ -4,7 +4,7 @@ using System;
namespace BetterLyrics.WinUI3.Models.Settings
{
- public partial class AlbumArtLayoutSettings : ObservableRecipient, ICloneable
+ public partial class AlbumArtAreaStyleSettings : ObservableRecipient, ICloneable
{
[ObservableProperty][NotifyPropertyChangedRecipients] public partial TextAlignmentType SongInfoAlignmentType { get; set; } = TextAlignmentType.Left;
@@ -19,11 +19,11 @@ namespace BetterLyrics.WinUI3.Models.Settings
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool ShowArtists { get; set; } = true;
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool ShowAlbum { get; set; } = false;
- public AlbumArtLayoutSettings() { }
+ public AlbumArtAreaStyleSettings() { }
public object Clone()
{
- return new AlbumArtLayoutSettings
+ return new AlbumArtAreaStyleSettings
{
SongInfoAlignmentType = this.SongInfoAlignmentType,
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/en-US/Resources.resw b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/en-US/Resources.resw
index 48aadc4..5e8cada 100644
--- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/en-US/Resources.resw
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/en-US/Resources.resw
@@ -594,6 +594,9 @@
Album art size
+
+ Album art area effect
+
Album art source
@@ -720,6 +723,9 @@
Create from templates
+
+ Crossfade
+
Current lyrics window status
@@ -891,6 +897,9 @@
Horizontal layout factor
+
+ Album art toggle animation
+
Import
@@ -1389,6 +1398,9 @@
Show title
+
+ Slide
+
Current value:
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/ja-JP/Resources.resw b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/ja-JP/Resources.resw
index b643cea..5c1bec3 100644
--- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/ja-JP/Resources.resw
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/ja-JP/Resources.resw
@@ -594,6 +594,9 @@
銈€儷銉愩儬銈€兗銉堛偟銈ゃ偤
+
+ 銈€儷銉愩儬銉兗銈搞儳銉炽偄銉嬨儭銉笺偡銉с兂
+
銈€儷銉愩儬銈€兗銉堛偨銉笺偣
@@ -720,6 +723,9 @@
銉嗐兂銉椼儸銉笺儓銇嬨倝浣滄垚
+
+ 銈儹銈广儠銈с兗銉
+
鐝惧湪銇瓕瑭炪偊銈c兂銉夈偊銈广儐銉笺偪銈
@@ -891,6 +897,9 @@
姘村钩銉偆銈€偊銉堜總鏁
+
+ 銈€儷銉愩儬銉銈ゃ偄銈般儵銉犮偄銉嬨儭銉笺偡銉с兂銇垏銈婃浛銇
+
銈ゃ兂銉濄兗銉
@@ -1389,6 +1398,9 @@
銈裤偆銉堛儷銈掕〃绀
+
+ 銈广儵銈ゃ儔
+
鐝惧湪銇わ細
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/ko-KR/Resources.resw b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/ko-KR/Resources.resw
index 7126bbb..faad470 100644
--- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/ko-KR/Resources.resw
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/ko-KR/Resources.resw
@@ -594,6 +594,9 @@
鞎矓 鞎勴姼 韥赴
+
+ 鞎矓 歆鞐 鞎犽媹氅旍澊靺
+
鞎矓 鞎勴姼 靻岇姢
@@ -720,6 +723,9 @@
韰滍攲毽快棎靹 毵岆摛旮
+
+ 韥鞀 韼橃澊霌
+
順勳灛 臧靷 彀 靸來儨
@@ -891,6 +897,9 @@
靾橅弶 霠堨澊鞎勳泝 鞖旍唽
+
+ 鞎矓 雼れ澊鞏搓犯霝 韱犼竴 鞎犽媹氅旍澊靺
+
臧鞝胳槫旮
@@ -1389,6 +1398,9 @@
鞝滊 響滌嫓
+
+ 靷挫 氚旮
+
順勳灛 臧旃 :
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/zh-CN/Resources.resw b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/zh-CN/Resources.resw
index 8c675f7..bcd84fa 100644
--- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/zh-CN/Resources.resw
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/zh-CN/Resources.resw
@@ -594,6 +594,9 @@
涓撹緫灏侀潰灏哄
+
+ 涓撹緫鍖哄煙鍔ㄦ晥
+
涓撹緫灏侀潰婧
@@ -720,6 +723,9 @@
浠庢ā鏉垮垱寤
+
+ 浜ゅ弶娣″叆娣″嚭
+
褰撳墠姝岃瘝绐楀彛鐘舵
@@ -891,6 +897,9 @@
姘村钩甯冨眬绯绘暟
+
+ 涓撹緫鍥惧垏鎹㈠姩鐢
+
瀵煎叆
@@ -1389,6 +1398,9 @@
鏄剧ず鏍囬
+
+ 婊戝姩
+
褰撳墠鍊硷細
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/zh-TW/Resources.resw b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/zh-TW/Resources.resw
index 97255b8..3c4a5ea 100644
--- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/zh-TW/Resources.resw
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Strings/zh-TW/Resources.resw
@@ -594,6 +594,9 @@
鐩哥翱钘濊灏哄
+
+ 灏堣集鍗鍩熷嫊鏁
+
灏堣集灏侀潰渚嗘簮
@@ -720,6 +723,9 @@
寰炵瘎鏈缓绔
+
+ 浜ゅ弶娣″叆娣″嚭
+
鐣跺墠姝岃绐楀彛鐙鎱
@@ -891,6 +897,9 @@
姘村钩甯冨眬绯绘暩
+
+ 灏堣集鍦栧垏鎻涘嫊鐣
+
鍖叆
@@ -1389,6 +1398,9 @@
椤ず妯欓
+
+ 婊戝嫊
+
鐩墠鍊硷細
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/ViewModels/LyricsWindowSettingsControlViewModel.cs b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/ViewModels/LyricsWindowSettingsControlViewModel.cs
index 511486a..8a3df59 100644
--- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/ViewModels/LyricsWindowSettingsControlViewModel.cs
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/ViewModels/LyricsWindowSettingsControlViewModel.cs
@@ -26,9 +26,6 @@ namespace BetterLyrics.WinUI3.ViewModels
[ObservableProperty]
public partial object ListViewSelectedItemTag { get; set; } = "General";
- [ObservableProperty]
- public partial ObservableCollection MonitorDeviceNames { get; set; }
-
[ObservableProperty]
public partial bool IsConfigPanelOpened { get; set; } = false;
@@ -45,14 +42,6 @@ namespace BetterLyrics.WinUI3.ViewModels
AppSettings = _settingsService.AppSettings;
LiveStates = _liveStatesService.LiveStates;
- MonitorDeviceNames = [.. MonitorHook.GetAllMonitorDeviceNames()];
- }
-
- [RelayCommand]
- private void RefreshMonitorDeviceNames()
- {
- MonitorDeviceNames = [.. MonitorHook.GetAllMonitorDeviceNames()];
- LiveStates.LyricsWindowStatus?.MonitorDeviceName = MonitorDeviceNames.FirstOrDefault() ?? "";
}
[RelayCommand]
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/NowPlayingPage.xaml b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/NowPlayingPage.xaml
index 7cec8e1..c32d938 100644
--- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/NowPlayingPage.xaml
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/NowPlayingPage.xaml
@@ -70,18 +70,11 @@
-
-
+ ShadowAmount="{x:Bind ViewModel.LiveStates.LyricsWindowStatus.AlbumArtLayoutSettings.CoverImageShadowAmount, Mode=OneWay}"
+ Source="{x:Bind ViewModel.MediaSessionsService.AlbumArtBitmapImage, Mode=OneWay}"
+ SwitchType="{x:Bind ViewModel.LiveStates.LyricsWindowStatus.AlbumArtAreaEffectSettings.ImageSwitchType, Mode=OneWay}" />
diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/NowPlayingPage.xaml.cs b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/NowPlayingPage.xaml.cs
index 045cb44..bc6b78c 100644
--- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/NowPlayingPage.xaml.cs
+++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/NowPlayingPage.xaml.cs
@@ -30,7 +30,6 @@ namespace BetterLyrics.WinUI3.Views
IRecipient>,
IRecipient>,
IRecipient>,
- IRecipient>,
IRecipient>,
IRecipient>,
IRecipient>,
@@ -54,7 +53,6 @@ namespace BetterLyrics.WinUI3.Views
WeakReferenceMessenger.Default.Register>(this);
WeakReferenceMessenger.Default.Register>(this);
WeakReferenceMessenger.Default.Register>(this);
- WeakReferenceMessenger.Default.Register>(this);
WeakReferenceMessenger.Default.Register>(this);
WeakReferenceMessenger.Default.Register>(this);
WeakReferenceMessenger.Default.Register>(this);
@@ -688,13 +686,13 @@ namespace BetterLyrics.WinUI3.Views
public void Receive(PropertyChangedMessage message)
{
- if (message.Sender is AlbumArtLayoutSettings)
+ if (message.Sender is AlbumArtAreaStyleSettings)
{
- if (message.PropertyName == nameof(AlbumArtLayoutSettings.SongInfoFontSize))
+ if (message.PropertyName == nameof(AlbumArtAreaStyleSettings.SongInfoFontSize))
{
RenderSongInfo();
}
- else if (message.PropertyName == nameof(AlbumArtLayoutSettings.CoverImageHeight))
+ else if (message.PropertyName == nameof(AlbumArtAreaStyleSettings.CoverImageHeight))
{
OnLayoutChanged();
}
@@ -703,13 +701,13 @@ namespace BetterLyrics.WinUI3.Views
public void Receive(PropertyChangedMessage message)
{
- if (message.Sender is AlbumArtLayoutSettings)
+ if (message.Sender is AlbumArtAreaStyleSettings)
{
- if (message.PropertyName == nameof(AlbumArtLayoutSettings.IsAutoSongInfoFontSize))
+ if (message.PropertyName == nameof(AlbumArtAreaStyleSettings.IsAutoSongInfoFontSize))
{
RenderSongInfo();
}
- else if (message.PropertyName == nameof(AlbumArtLayoutSettings.IsAutoCoverImageHeight))
+ else if (message.PropertyName == nameof(AlbumArtAreaStyleSettings.IsAutoCoverImageHeight))
{
OnLayoutChanged();
}
@@ -746,26 +744,6 @@ namespace BetterLyrics.WinUI3.Views
}
}
- public async void Receive(PropertyChangedMessage message)
- {
- if (message.Sender is IMediaSessionsService)
- {
- if (message.PropertyName == nameof(IMediaSessionsService.AlbumArtBitmapImage))
- {
- LastAlbumArtImage.ImageSource = AlbumArtImage.ImageSource;
- LastAlbumArtImage.Opacity = 1;
- await Task.Delay(Constants.Time.AnimationDuration);
-
- AlbumArtImage.Opacity = 0;
- await Task.Delay(Constants.Time.AnimationDuration);
- AlbumArtImage.ImageSource = message.NewValue;
-
- LastAlbumArtImage.Opacity = 0;
- AlbumArtImage.Opacity = 1;
- }
- }
- }
-
public void Receive(PropertyChangedMessage message)
{
if (message.Sender is LyricsWindowStatus)