mirror of
https://github.com/jayfunc/BetterLyrics.git
synced 2026-01-12 10:54:55 +08:00
Compare commits
13 Commits
v1.1.186.0
...
v1.1.190.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa7d56f1cb | ||
|
|
8dbe76e790 | ||
|
|
de6410492e | ||
|
|
26df7c7f67 | ||
|
|
3c411374bd | ||
|
|
99f0b9443b | ||
|
|
a3bc148816 | ||
|
|
cea757702b | ||
|
|
8938a5c798 | ||
|
|
46f4589b64 | ||
|
|
adb02658f4 | ||
|
|
3d7e6061e9 | ||
|
|
a51220c7b9 |
@@ -12,7 +12,7 @@
|
||||
<Identity
|
||||
Name="37412.BetterLyrics"
|
||||
Publisher="CN=E1428B0E-DC1D-4EA4-ACB1-4556569D5BA9"
|
||||
Version="1.1.186.0" />
|
||||
Version="1.1.190.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="ca4a4830-fc19-40d9-b823-53e2bff3d816" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
|
||||
@@ -83,8 +83,6 @@
|
||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.7175" />
|
||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.8.251106002" />
|
||||
<PackageReference Include="NAudio.Wasapi" Version="2.2.1" />
|
||||
<PackageReference Include="Nito.AsyncEx" Version="5.1.2" />
|
||||
<PackageReference Include="Nito.AsyncEx.Tasks" Version="5.1.2" />
|
||||
<PackageReference Include="NTextCat" Version="0.3.65" />
|
||||
<PackageReference Include="Serilog.Extensions.Logging" Version="10.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
|
||||
|
||||
@@ -71,6 +71,10 @@
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.MusicGallerySettings.AutoPlay, Mode=TwoWay}" />
|
||||
</dev:SettingsCard>
|
||||
|
||||
<dev:SettingsCard x:Uid="SettingsPageStopTrackOnGalleryWindowClosed" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.MusicGallerySettings.StopOnWindowClosed, Mode=TwoWay}" />
|
||||
</dev:SettingsCard>
|
||||
|
||||
<dev:SettingsCard x:Uid="SettingsPageExitOnGalleryWindowClosed" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.MusicGallerySettings.ExitOnWindowClosed, Mode=TwoWay}" />
|
||||
</dev:SettingsCard>
|
||||
|
||||
@@ -47,6 +47,51 @@
|
||||
</dev:SettingsExpander.Items>
|
||||
</dev:SettingsExpander>
|
||||
|
||||
<dev:SettingsExpander
|
||||
x:Uid="SettingsPageAlbumArtLayer"
|
||||
HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
||||
Glyph=}"
|
||||
IsExpanded="{x:Bind LyricsBackgroundSettings.IsCoverOverlayEnabled, Mode=OneWay}">
|
||||
<ToggleSwitch IsOn="{x:Bind LyricsBackgroundSettings.IsCoverOverlayEnabled, Mode=TwoWay}" />
|
||||
<dev:SettingsExpander.Items>
|
||||
|
||||
<dev:SettingsCard x:Uid="SettingsPageOpacity" IsEnabled="{x:Bind LyricsBackgroundSettings.IsCoverOverlayEnabled, Mode=OneWay}">
|
||||
<uc:ExtendedSlider
|
||||
Default="100"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
Unit="%"
|
||||
Value="{x:Bind LyricsBackgroundSettings.CoverOverlayOpacity, Mode=TwoWay}" />
|
||||
</dev:SettingsCard>
|
||||
|
||||
<dev:SettingsCard x:Uid="SettingsPageSpeed" IsEnabled="{x:Bind LyricsBackgroundSettings.IsCoverOverlayEnabled, Mode=OneWay}">
|
||||
<uc:ExtendedSlider
|
||||
Default="50"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
Unit="%"
|
||||
Value="{x:Bind LyricsBackgroundSettings.CoverOverlaySpeed, Mode=TwoWay}" />
|
||||
</dev:SettingsCard>
|
||||
|
||||
<dev:SettingsCard x:Uid="SettingsPageBlurAmount" IsEnabled="{x:Bind LyricsBackgroundSettings.IsCoverOverlayEnabled, Mode=OneWay}">
|
||||
<uc:ExtendedSlider
|
||||
Default="100"
|
||||
Maximum="200"
|
||||
Minimum="0"
|
||||
Value="{x:Bind LyricsBackgroundSettings.CoverOverlayBlurAmount, Mode=TwoWay}" />
|
||||
</dev:SettingsCard>
|
||||
|
||||
<!--<dev:SettingsCard x:Uid="SettingsPageBackgroundAcrylicEffectAmount" IsEnabled="{x:Bind LyricsBackgroundSettings.IsCoverOverlayEnabled, Mode=OneWay}">
|
||||
<uc:ExtendedSlider
|
||||
Default="0"
|
||||
Maximum="10"
|
||||
Minimum="0"
|
||||
Value="{x:Bind LyricsBackgroundSettings.CoverAcrylicEffectAmount, Mode=TwoWay}" />
|
||||
</dev:SettingsCard>-->
|
||||
|
||||
</dev:SettingsExpander.Items>
|
||||
</dev:SettingsExpander>
|
||||
|
||||
<dev:SettingsExpander
|
||||
x:Uid="SettingsPageFluidLayer"
|
||||
HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
||||
|
||||
@@ -13,15 +13,21 @@ using BetterLyrics.WinUI3.Services.SettingsService;
|
||||
using CommunityToolkit.Mvvm.DependencyInjection;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using CommunityToolkit.Mvvm.Messaging.Messages;
|
||||
using Lyricify.Lyrics.Providers.Web.Netease;
|
||||
using Microsoft.Graphics.Canvas;
|
||||
using Microsoft.Graphics.Canvas.UI.Xaml;
|
||||
using Microsoft.UI;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.Foundation;
|
||||
using Windows.Storage.Streams;
|
||||
using Windows.UI;
|
||||
using static Vanara.PInvoke.Ole32;
|
||||
|
||||
namespace BetterLyrics.WinUI3.Controls
|
||||
{
|
||||
@@ -34,7 +40,8 @@ namespace BetterLyrics.WinUI3.Controls
|
||||
IRecipient<PropertyChangedMessage<bool>>,
|
||||
IRecipient<PropertyChangedMessage<TextAlignmentType>>,
|
||||
IRecipient<PropertyChangedMessage<LyricsFontWeight>>,
|
||||
IRecipient<PropertyChangedMessage<string>>
|
||||
IRecipient<PropertyChangedMessage<string>>,
|
||||
IRecipient<PropertyChangedMessage<IRandomAccessStream?>>
|
||||
{
|
||||
private readonly ISettingsService _settingsService = Ioc.Default.GetRequiredService<ISettingsService>();
|
||||
private readonly IMediaSessionsService _mediaSessionsService = Ioc.Default.GetRequiredService<IMediaSessionsService>();
|
||||
@@ -42,6 +49,7 @@ namespace BetterLyrics.WinUI3.Controls
|
||||
|
||||
private readonly LyricsRenderer _lyricsRenderer = new();
|
||||
private readonly FluidBackgroundRenderer _fluidRenderer = new();
|
||||
private readonly CoverBackgroundRenderer _coverRenderer = new();
|
||||
private readonly PureColorBackgroundRenderer _pureColorRenderer = new();
|
||||
private readonly SnowRenderer _snowRenderer = new();
|
||||
private readonly FogRenderer _fogRenderer = new();
|
||||
@@ -368,8 +376,8 @@ namespace BetterLyrics.WinUI3.Controls
|
||||
lyricsBg.IsPureColorOverlayEnabled
|
||||
);
|
||||
|
||||
_fluidRenderer.Opacity = lyricsBg.FluidOverlayOpacity / 100.0;
|
||||
_fluidRenderer.IsEnabled = lyricsBg.IsFluidOverlayEnabled;
|
||||
_coverRenderer.Draw(sender, args.DrawingSession);
|
||||
|
||||
_fluidRenderer.Draw(sender, args.DrawingSession);
|
||||
|
||||
_snowRenderer.Draw(sender, args.DrawingSession);
|
||||
@@ -549,16 +557,21 @@ namespace BetterLyrics.WinUI3.Controls
|
||||
|
||||
_isLayoutChanged = false;
|
||||
|
||||
if (_fluidRenderer.IsEnabled)
|
||||
{
|
||||
_fluidRenderer.UpdateColors(
|
||||
_accentColor1Transition.Value,
|
||||
_accentColor2Transition.Value,
|
||||
_accentColor3Transition.Value,
|
||||
_accentColor4Transition.Value
|
||||
);
|
||||
_fluidRenderer.Update(elapsedTime);
|
||||
}
|
||||
_fluidRenderer.IsEnabled = lyricsBg.IsFluidOverlayEnabled;
|
||||
_fluidRenderer.Opacity = lyricsBg.FluidOverlayOpacity / 100.0;
|
||||
_fluidRenderer.UpdateColors(
|
||||
_accentColor1Transition.Value,
|
||||
_accentColor2Transition.Value,
|
||||
_accentColor3Transition.Value,
|
||||
_accentColor4Transition.Value
|
||||
);
|
||||
_fluidRenderer.Update(elapsedTime);
|
||||
|
||||
_coverRenderer.IsEnabled = lyricsBg.IsCoverOverlayEnabled;
|
||||
_coverRenderer.Opacity = lyricsBg.CoverOverlayOpacity;
|
||||
_coverRenderer.BlurAmount = lyricsBg.CoverOverlayBlurAmount;
|
||||
_coverRenderer.Speed = lyricsBg.CoverOverlaySpeed;
|
||||
_coverRenderer.Update(elapsedTime);
|
||||
|
||||
_snowRenderer.IsEnabled = lyricsBg.IsSnowFlakeOverlayEnabled;
|
||||
_snowRenderer.Amount = lyricsBg.SnowFlakeOverlayAmount / 100f;
|
||||
@@ -586,6 +599,7 @@ namespace BetterLyrics.WinUI3.Controls
|
||||
private void Canvas_Unloaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_fluidRenderer.Dispose();
|
||||
_coverRenderer.Dispose();
|
||||
_snowRenderer.Dispose();
|
||||
_fogRenderer.Dispose();
|
||||
_spectrumRenderer.Dispose();
|
||||
@@ -600,7 +614,13 @@ namespace BetterLyrics.WinUI3.Controls
|
||||
|
||||
private async void Canvas_CreateResources(CanvasAnimatedControl sender, Microsoft.Graphics.Canvas.UI.CanvasCreateResourcesEventArgs args)
|
||||
{
|
||||
args.TrackAsyncAction(_fluidRenderer.LoadResourcesAsync().AsAsyncAction());
|
||||
var tasks = new Task[]
|
||||
{
|
||||
_fluidRenderer.LoadResourcesAsync(),
|
||||
ReloadCoverBackgroundResourcesAsync()
|
||||
};
|
||||
args.TrackAsyncAction(Task.WhenAll(tasks).AsAsyncAction());
|
||||
|
||||
_snowRenderer.LoadResources();
|
||||
_fogRenderer.LoadResources();
|
||||
|
||||
@@ -682,6 +702,16 @@ namespace BetterLyrics.WinUI3.Controls
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
private async Task ReloadCoverBackgroundResourcesAsync()
|
||||
{
|
||||
if (_mediaSessionsService.AlbumArtBitmapStream is IRandomAccessStream stream)
|
||||
{
|
||||
stream.Seek(0);
|
||||
CanvasBitmap bitmap = await CanvasBitmap.LoadAsync(Canvas, stream);
|
||||
_coverRenderer.SetCoverBitmap(bitmap);
|
||||
}
|
||||
}
|
||||
|
||||
public void Receive(PropertyChangedMessage<TimeSpan> message)
|
||||
{
|
||||
if (message.Sender is IMediaSessionsService)
|
||||
@@ -874,5 +904,15 @@ namespace BetterLyrics.WinUI3.Controls
|
||||
}
|
||||
}
|
||||
|
||||
public void Receive(PropertyChangedMessage<IRandomAccessStream?> message)
|
||||
{
|
||||
if (message.Sender is IMediaSessionsService)
|
||||
{
|
||||
if (message.PropertyName == nameof(IMediaSessionsService.AlbumArtBitmapStream))
|
||||
{
|
||||
_ = ReloadCoverBackgroundResourcesAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
<dev:SettingsCard x:Uid="SettingsPageLyricsCenterTopOffset" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||
<local:ExtendedSlider
|
||||
Default="50"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
Maximum="99"
|
||||
Minimum="1"
|
||||
Unit="%"
|
||||
Value="{x:Bind LyricsStyleSettings.PlayingLineTopOffset, Mode=TwoWay}" />
|
||||
</dev:SettingsCard>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:uc="using:BetterLyrics.WinUI3.Controls"
|
||||
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||
Loaded="UserControl_Loaded"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Grid>
|
||||
|
||||
@@ -10,6 +10,7 @@ using CommunityToolkit.WinUI.Controls;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Input;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -26,14 +27,14 @@ namespace BetterLyrics.WinUI3.Controls
|
||||
|
||||
private readonly ISettingsService _settingsService = Ioc.Default.GetRequiredService<ISettingsService>();
|
||||
|
||||
public LyricsWindowStatus LyricsWindowStatus
|
||||
public LyricsWindowStatus? LyricsWindowStatus
|
||||
{
|
||||
get { return (LyricsWindowStatus)GetValue(LyricsWindowStatusProperty); }
|
||||
get { return (LyricsWindowStatus?)GetValue(LyricsWindowStatusProperty); }
|
||||
set { SetValue(LyricsWindowStatusProperty, value); }
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty LyricsWindowStatusProperty =
|
||||
DependencyProperty.Register(nameof(LyricsWindowStatus), typeof(LyricsWindowStatus), typeof(LyricsWindowSettingsControl), new PropertyMetadata(default));
|
||||
DependencyProperty.Register(nameof(LyricsWindowStatus), typeof(LyricsWindowStatus), typeof(LyricsWindowSettingsControl), new PropertyMetadata(null));
|
||||
|
||||
public LyricsWindowSettingsControl()
|
||||
{
|
||||
@@ -186,17 +187,6 @@ namespace BetterLyrics.WinUI3.Controls
|
||||
}
|
||||
}
|
||||
|
||||
private void ConfigSelectorBar_SelectionChanged(SelectorBar sender, SelectorBarSelectionChangedEventArgs args)
|
||||
{
|
||||
if (sender is SelectorBar bar)
|
||||
{
|
||||
if (bar.SelectedItem is SelectorBarItem item)
|
||||
{
|
||||
ViewModel?.SelectorBarSelectedItemTag = item.Tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CloseStatusButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is FrameworkElement element)
|
||||
@@ -213,5 +203,10 @@ namespace BetterLyrics.WinUI3.Controls
|
||||
{
|
||||
ViewModel.SelectorBarSelectedItemTag = (string)((SegmentedItem)((Segmented)sender).SelectedItem).Tag;
|
||||
}
|
||||
|
||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ViewModel.CloseConfigPanelCommand.Execute(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<Grid
|
||||
x:Name="BottomCommandGrid"
|
||||
Background="{ThemeResource AcrylicInAppFillColorDefaultBrush}"
|
||||
Background="{ThemeResource LayerOnMicaBaseAltFillColorDefaultBrush}"
|
||||
Opacity="{x:Bind ViewModel.BottomCommandGridOpacity, Mode=OneWay}"
|
||||
PointerEntered="BottomCommandGrid_PointerEntered"
|
||||
PointerExited="BottomCommandGrid_PointerExited">
|
||||
|
||||
@@ -102,6 +102,10 @@
|
||||
</dev:SettingsExpander.Items>
|
||||
</dev:SettingsExpander>
|
||||
|
||||
<dev:SettingsCard x:Uid="SettingsPageAlwaysHideUnlockButton" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||
<ToggleSwitch IsOn="{x:Bind LyricsWindowStatus.IsAlwaysHideUnlockButton, Mode=TwoWay}" />
|
||||
</dev:SettingsCard>
|
||||
|
||||
<dev:SettingsExpander
|
||||
x:Uid="SettingsPageAOT"
|
||||
HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace BetterLyrics.WinUI3.Models
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsAlwaysOnTopPolling { get; set; } = false;
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsShownInSwitchers { get; set; } = true;
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsLocked { get; set; } = false;
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsAlwaysHideUnlockButton { get; set; } = false;
|
||||
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsPinToTaskbar { get; set; } = false;
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial TaskbarPlacement TaskbarPlacement { get; set; } = TaskbarPlacement.Right;
|
||||
@@ -200,6 +201,7 @@ namespace BetterLyrics.WinUI3.Models
|
||||
IsAlwaysOnTopPolling = this.IsAlwaysOnTopPolling,
|
||||
IsShownInSwitchers = this.IsShownInSwitchers,
|
||||
IsLocked = this.IsLocked,
|
||||
IsAlwaysHideUnlockButton = this.IsAlwaysHideUnlockButton,
|
||||
|
||||
IsPinToTaskbar = this.IsPinToTaskbar,
|
||||
TaskbarPlacement = this.TaskbarPlacement,
|
||||
|
||||
@@ -12,6 +12,11 @@ namespace BetterLyrics.WinUI3.Models.Settings
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsPureColorOverlayEnabled { get; set; } = false;
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int PureColorOverlayOpacity { get; set; } = 100; // 100 % = 1.0
|
||||
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsCoverOverlayEnabled { get; set; } = false;
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int CoverOverlayOpacity { get; set; } = 100; // 100 % = 1.0
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int CoverOverlaySpeed { get; set; } = 50;
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int CoverOverlayBlurAmount { get; set; } = 100;
|
||||
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsFluidOverlayEnabled { get; set; } = true;
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int FluidOverlayOpacity { get; set; } = 100;
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial PaletteGeneratorType PaletteGeneratorType { get; set; } = PaletteGeneratorType.MedianCut;
|
||||
@@ -39,14 +44,25 @@ namespace BetterLyrics.WinUI3.Models.Settings
|
||||
IsPureColorOverlayEnabled = this.IsPureColorOverlayEnabled,
|
||||
PureColorOverlayOpacity = this.PureColorOverlayOpacity,
|
||||
|
||||
IsCoverOverlayEnabled = this.IsCoverOverlayEnabled,
|
||||
CoverOverlayOpacity = this.CoverOverlayOpacity,
|
||||
CoverOverlaySpeed = this.CoverOverlaySpeed,
|
||||
CoverOverlayBlurAmount = this.CoverOverlayBlurAmount,
|
||||
|
||||
IsFluidOverlayEnabled = this.IsFluidOverlayEnabled,
|
||||
FluidOverlayOpacity = this.FluidOverlayOpacity,
|
||||
PaletteGeneratorType = this.PaletteGeneratorType,
|
||||
|
||||
IsSpectrumOverlayEnabled = this.IsSpectrumOverlayEnabled,
|
||||
SpectrumPlacement = this.SpectrumPlacement,
|
||||
SpectrumStyle = this.SpectrumStyle,
|
||||
SpectrumCount = this.SpectrumCount,
|
||||
|
||||
IsSnowFlakeOverlayEnabled = this.IsSnowFlakeOverlayEnabled,
|
||||
SnowFlakeOverlayAmount = this.SnowFlakeOverlayAmount,
|
||||
SnowFlakeOverlaySpeed = this.SnowFlakeOverlaySpeed,
|
||||
|
||||
IsFogOverlayEnabled = this.IsFogOverlayEnabled,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ namespace BetterLyrics.WinUI3.Models.Settings
|
||||
LyricsGlowEffectLongSyllableDuration = this.LyricsGlowEffectLongSyllableDuration,
|
||||
IsLyricsGlowEffectAmountAutoAdjust = this.IsLyricsGlowEffectAmountAutoAdjust,
|
||||
LyricsGlowEffectAmount = this.LyricsGlowEffectAmount,
|
||||
LyricsGlowEffectScope = this.LyricsGlowEffectScope,
|
||||
|
||||
IsLyricsScaleEffectEnabled = this.IsLyricsScaleEffectEnabled,
|
||||
LyricsScaleEffectLongSyllableDuration = this.LyricsScaleEffectLongSyllableDuration,
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace BetterLyrics.WinUI3.Models.Settings
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool AutoPlay { get; set; } = false;
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial LyricsWindowStatus LyricsWindowStatus { get; set; } = new();
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool ExitOnWindowClosed { get; set; } = false;
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool StopOnWindowClosed { get; set; } = false;
|
||||
|
||||
public MusicGallerySettings() { }
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using Microsoft.Graphics.Canvas.Effects;
|
||||
using Microsoft.Graphics.Canvas.UI.Xaml;
|
||||
using System;
|
||||
using System.Numerics;
|
||||
using Windows.Foundation;
|
||||
|
||||
namespace BetterLyrics.WinUI3.Renderer
|
||||
{
|
||||
@@ -13,17 +14,47 @@ namespace BetterLyrics.WinUI3.Renderer
|
||||
private CanvasBitmap? _currentBitmap;
|
||||
private CanvasBitmap? _previousBitmap;
|
||||
|
||||
private readonly ValueTransition<double> _crossfadeTransition;
|
||||
private CanvasRenderTarget? _currentTargetCache;
|
||||
private CanvasRenderTarget? _previousTargetCache;
|
||||
|
||||
private Size _lastScreenSize;
|
||||
private bool _lastWasRotating = false;
|
||||
|
||||
private readonly ValueTransition<double> _crossfadeTransition;
|
||||
private float _rotationAngle = 0f;
|
||||
|
||||
public bool IsEnabled { get; set; } = false;
|
||||
|
||||
public int Opacity { get; set; } = 100;
|
||||
|
||||
public int BlurAmount { get; set; } = 100;
|
||||
private bool _needsCacheUpdate = false;
|
||||
|
||||
public int Speed { get; set; } = 100;
|
||||
private int _blurAmount = 100;
|
||||
public int BlurAmount
|
||||
{
|
||||
get => _blurAmount;
|
||||
set
|
||||
{
|
||||
if (_blurAmount != value)
|
||||
{
|
||||
_blurAmount = value;
|
||||
_needsCacheUpdate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int _speed = 100;
|
||||
public int Speed
|
||||
{
|
||||
get => _speed;
|
||||
set
|
||||
{
|
||||
if (_speed != value)
|
||||
{
|
||||
_speed = value;
|
||||
_needsCacheUpdate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public CoverBackgroundRenderer()
|
||||
{
|
||||
@@ -34,26 +65,30 @@ namespace BetterLyrics.WinUI3.Renderer
|
||||
{
|
||||
if (_currentBitmap == newBitmap) return;
|
||||
|
||||
if (_currentBitmap == null)
|
||||
{
|
||||
_currentBitmap = newBitmap;
|
||||
_crossfadeTransition.StartTransition(1.0, jumpTo: true);
|
||||
return;
|
||||
}
|
||||
|
||||
_previousBitmap = _currentBitmap;
|
||||
_previousTargetCache = _currentTargetCache;
|
||||
_currentTargetCache = null;
|
||||
|
||||
_currentBitmap = newBitmap;
|
||||
|
||||
if (newBitmap != null)
|
||||
if (_currentBitmap == null)
|
||||
{
|
||||
_crossfadeTransition.Reset(0.0);
|
||||
_crossfadeTransition.StartTransition(1.0);
|
||||
_crossfadeTransition.StartTransition(1.0, jumpTo: true);
|
||||
}
|
||||
else
|
||||
{
|
||||
_previousBitmap = null;
|
||||
_crossfadeTransition.StartTransition(1.0, jumpTo: true);
|
||||
if (_previousBitmap == null)
|
||||
{
|
||||
_crossfadeTransition.StartTransition(1.0, jumpTo: true);
|
||||
}
|
||||
else
|
||||
{
|
||||
_crossfadeTransition.Reset(0.0);
|
||||
_crossfadeTransition.StartTransition(1.0);
|
||||
}
|
||||
}
|
||||
|
||||
_needsCacheUpdate = true;
|
||||
}
|
||||
|
||||
public void Update(TimeSpan deltaTime)
|
||||
@@ -64,17 +99,17 @@ namespace BetterLyrics.WinUI3.Renderer
|
||||
|
||||
if (Speed > 0)
|
||||
{
|
||||
float baseSpeed = 0.6f; // 弧度/秒
|
||||
float baseSpeed = 0.6f;
|
||||
float currentSpeed = (Speed / 100.0f) * baseSpeed;
|
||||
|
||||
_rotationAngle += currentSpeed * (float)deltaTime.TotalSeconds;
|
||||
|
||||
_rotationAngle %= (float)(2 * Math.PI);
|
||||
}
|
||||
|
||||
if (_crossfadeTransition.Value >= 1.0 && _previousBitmap != null)
|
||||
{
|
||||
_previousBitmap = null;
|
||||
_previousTargetCache?.Dispose();
|
||||
_previousTargetCache = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,84 +117,133 @@ namespace BetterLyrics.WinUI3.Renderer
|
||||
{
|
||||
if (!IsEnabled || Opacity <= 0) return;
|
||||
|
||||
if (_lastScreenSize != control.Size)
|
||||
{
|
||||
_lastScreenSize = control.Size;
|
||||
_needsCacheUpdate = true;
|
||||
}
|
||||
|
||||
bool isRotating = Speed > 0;
|
||||
if (_lastWasRotating != isRotating)
|
||||
{
|
||||
_lastWasRotating = isRotating;
|
||||
_needsCacheUpdate = true;
|
||||
}
|
||||
|
||||
EnsureCachedLayer(control, _currentBitmap, ref _currentTargetCache);
|
||||
|
||||
float baseAlpha = Opacity / 100.0f;
|
||||
float currentBlur = BlurAmount;
|
||||
|
||||
float angle = Speed > 0 ? _rotationAngle : 0f;
|
||||
|
||||
float angle = isRotating ? _rotationAngle : 0f;
|
||||
double fadeProgress = _crossfadeTransition.Value;
|
||||
bool isCrossfading = fadeProgress < 1.0 && _previousBitmap != null;
|
||||
bool isCrossfading = fadeProgress < 1.0 && _previousTargetCache != null;
|
||||
|
||||
Vector2 screenCenter = new Vector2((float)control.Size.Width / 2f, (float)control.Size.Height / 2f);
|
||||
|
||||
if (isCrossfading)
|
||||
{
|
||||
DrawLayer(ds, control.Size, _previousBitmap, angle, currentBlur, baseAlpha);
|
||||
DrawCachedLayer(ds, _previousTargetCache, screenCenter, angle, baseAlpha);
|
||||
|
||||
float newLayerAlpha = baseAlpha * (float)fadeProgress;
|
||||
if (newLayerAlpha > 0.005f)
|
||||
{
|
||||
DrawLayer(ds, control.Size, _currentBitmap, angle, currentBlur, newLayerAlpha);
|
||||
}
|
||||
DrawCachedLayer(ds, _currentTargetCache, screenCenter, angle, newLayerAlpha);
|
||||
}
|
||||
else if (_currentBitmap != null)
|
||||
else if (_currentTargetCache != null)
|
||||
{
|
||||
DrawLayer(ds, control.Size, _currentBitmap, angle, currentBlur, baseAlpha);
|
||||
DrawCachedLayer(ds, _currentTargetCache, screenCenter, angle, baseAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawLayer(CanvasDrawingSession ds, Windows.Foundation.Size screenSize, CanvasBitmap? bitmap, float rotationRadians, float blurAmount, float alpha)
|
||||
private void EnsureCachedLayer(ICanvasResourceCreator resourceCreator, CanvasBitmap? sourceBitmap, ref CanvasRenderTarget? targetCache)
|
||||
{
|
||||
if (bitmap == null) return;
|
||||
|
||||
float imgW = bitmap.SizeInPixels.Width;
|
||||
float imgH = bitmap.SizeInPixels.Height;
|
||||
Vector2 screenCenter = new Vector2((float)screenSize.Width / 2f, (float)screenSize.Height / 2f);
|
||||
|
||||
float scale;
|
||||
if (Speed > 0 && Math.Abs(rotationRadians) > 0.001f)
|
||||
if (sourceBitmap == null)
|
||||
{
|
||||
float screenDiagonal = (float)Math.Sqrt(screenSize.Width * screenSize.Width + screenSize.Height * screenSize.Height);
|
||||
|
||||
float scaleX = screenDiagonal / imgW;
|
||||
float scaleY = screenDiagonal / imgH;
|
||||
scale = Math.Max(scaleX, scaleY);
|
||||
}
|
||||
else
|
||||
{
|
||||
float scaleX = (float)screenSize.Width / imgW;
|
||||
float scaleY = (float)screenSize.Height / imgH;
|
||||
scale = Math.Max(scaleX, scaleY);
|
||||
targetCache?.Dispose();
|
||||
targetCache = null;
|
||||
return;
|
||||
}
|
||||
|
||||
// 缩放图片 -> 将图片中心移动到 (0,0) 以便旋转 -> 旋转 ->将图片移回屏幕中心
|
||||
Vector2 imgCenterOffset = new Vector2(
|
||||
((float)screenSize.Width - imgW * scale) / 2.0f,
|
||||
((float)screenSize.Height - imgH * scale) / 2.0f
|
||||
);
|
||||
bool deviceMismatch = targetCache != null && targetCache.Device != resourceCreator.Device;
|
||||
|
||||
if (_needsCacheUpdate || targetCache == null || deviceMismatch)
|
||||
{
|
||||
targetCache?.Dispose();
|
||||
|
||||
float imgW = sourceBitmap.SizeInPixels.Width;
|
||||
float imgH = sourceBitmap.SizeInPixels.Height;
|
||||
Size screenSize = _lastScreenSize;
|
||||
|
||||
float scale;
|
||||
if (_lastWasRotating) // Speed > 0
|
||||
{
|
||||
float screenDiagonal = (float)Math.Sqrt(screenSize.Width * screenSize.Width + screenSize.Height * screenSize.Height);
|
||||
scale = Math.Max(screenDiagonal / imgW, screenDiagonal / imgH);
|
||||
}
|
||||
else
|
||||
{
|
||||
float scaleX = (float)screenSize.Width / imgW;
|
||||
float scaleY = (float)screenSize.Height / imgH;
|
||||
scale = Math.Max(scaleX, scaleY);
|
||||
}
|
||||
|
||||
float targetW = imgW * scale;
|
||||
float targetH = imgH * scale;
|
||||
|
||||
targetCache = new CanvasRenderTarget(resourceCreator, targetW, targetH, sourceBitmap.Dpi);
|
||||
|
||||
using (var ds = targetCache.CreateDrawingSession())
|
||||
{
|
||||
ds.Clear(Windows.UI.Color.FromArgb(0, 0, 0, 0));
|
||||
|
||||
using (var transformEffect = new Transform2DEffect())
|
||||
using (var blurEffect = new GaussianBlurEffect())
|
||||
{
|
||||
transformEffect.Source = sourceBitmap;
|
||||
transformEffect.TransformMatrix = Matrix3x2.CreateScale(scale);
|
||||
transformEffect.InterpolationMode = CanvasImageInterpolation.Linear;
|
||||
|
||||
blurEffect.Source = transformEffect;
|
||||
blurEffect.BlurAmount = BlurAmount;
|
||||
blurEffect.BorderMode = EffectBorderMode.Hard;
|
||||
|
||||
ds.DrawImage(blurEffect);
|
||||
}
|
||||
}
|
||||
|
||||
if (sourceBitmap == _currentBitmap)
|
||||
{
|
||||
_needsCacheUpdate = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawCachedLayer(CanvasDrawingSession ds, CanvasRenderTarget? cachedTexture, Vector2 screenCenter, float rotationRadians, float alpha)
|
||||
{
|
||||
if (cachedTexture == null) return;
|
||||
|
||||
Vector2 textureCenter = new Vector2((float)cachedTexture.Size.Width / 2f, (float)cachedTexture.Size.Height / 2f);
|
||||
|
||||
Matrix3x2 transform =
|
||||
Matrix3x2.CreateScale(scale) * Matrix3x2.CreateTranslation(imgCenterOffset) * Matrix3x2.CreateRotation(rotationRadians, screenCenter);
|
||||
Matrix3x2.CreateTranslation(-textureCenter) * Matrix3x2.CreateRotation(rotationRadians) * Matrix3x2.CreateTranslation(screenCenter);
|
||||
|
||||
using (var transformEffect = new Transform2DEffect())
|
||||
using (var blurEffect = new GaussianBlurEffect())
|
||||
{
|
||||
transformEffect.Source = bitmap;
|
||||
transformEffect.TransformMatrix = transform;
|
||||
transformEffect.InterpolationMode = CanvasImageInterpolation.Linear;
|
||||
Matrix3x2 previousTransform = ds.Transform;
|
||||
|
||||
blurEffect.Source = transformEffect;
|
||||
blurEffect.BlurAmount = blurAmount > 0 ? (blurAmount / 2.0f) : 0f;
|
||||
blurEffect.BorderMode = EffectBorderMode.Hard;
|
||||
ds.Transform = transform * previousTransform;
|
||||
ds.DrawImage(cachedTexture, 0, 0, new Rect(0, 0, cachedTexture.Size.Width, cachedTexture.Size.Height), alpha);
|
||||
|
||||
ds.DrawImage(blurEffect, 0, 0, new Windows.Foundation.Rect(0, 0, screenSize.Width, screenSize.Height), alpha);
|
||||
}
|
||||
ds.Transform = previousTransform;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_currentBitmap?.Dispose();
|
||||
_currentBitmap = null;
|
||||
_previousBitmap?.Dispose();
|
||||
|
||||
_currentTargetCache?.Dispose();
|
||||
_previousTargetCache?.Dispose();
|
||||
|
||||
_currentBitmap = null;
|
||||
_previousBitmap = null;
|
||||
_currentTargetCache = null;
|
||||
_previousTargetCache = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using Microsoft.UI.Xaml.Media.Imaging;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.Storage.Streams;
|
||||
using Windows.UI;
|
||||
|
||||
namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
||||
@@ -28,6 +29,7 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
||||
LyricsData? CurrentLyricsData { get; }
|
||||
|
||||
BitmapImage? AlbumArtBitmapImage { get; }
|
||||
IRandomAccessStream? AlbumArtBitmapStream { get; }
|
||||
|
||||
AlbumArtThemeColors CalculateAlbumArtThemeColors(LyricsWindowStatus lyricsWindowStatus, Color backdropAccentColor);
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
||||
private BitmapDecoder? _albumArtBitmapDecoder = null;
|
||||
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial BitmapImage? AlbumArtBitmapImage { get; set; }
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial IRandomAccessStream? AlbumArtBitmapStream { get; set; }
|
||||
|
||||
private void UpdateAlbumArt()
|
||||
{
|
||||
@@ -80,6 +81,7 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
||||
if (token.IsCancellationRequested) return;
|
||||
|
||||
AlbumArtBitmapImage = bitmapImage;
|
||||
AlbumArtBitmapStream = ImageHelper.ToIRandomAccessStream(buffer);
|
||||
}
|
||||
|
||||
public AlbumArtThemeColors CalculateAlbumArtThemeColors(LyricsWindowStatus lyricsWindowStatus, Color backdropAccentColor)
|
||||
|
||||
@@ -630,6 +630,9 @@
|
||||
<data name="SettingsPageAlignment.Header" xml:space="preserve">
|
||||
<value>Alignment</value>
|
||||
</data>
|
||||
<data name="SettingsPageAlwaysHideUnlockButton.Header" xml:space="preserve">
|
||||
<value>Always hide unlock button</value>
|
||||
</data>
|
||||
<data name="SettingsPageAmllTtmlDbBaseUrl.Header" xml:space="preserve">
|
||||
<value>Base URL</value>
|
||||
</data>
|
||||
@@ -1509,6 +1512,9 @@
|
||||
<data name="SettingsPageStartup.Text" xml:space="preserve">
|
||||
<value>Start</value>
|
||||
</data>
|
||||
<data name="SettingsPageStopTrackOnGalleryWindowClosed.Header" xml:space="preserve">
|
||||
<value>Stop playing when music library is closed</value>
|
||||
</data>
|
||||
<data name="SettingsPageStrokeFontColor.Header" xml:space="preserve">
|
||||
<value>Stroke color</value>
|
||||
</data>
|
||||
|
||||
@@ -630,6 +630,9 @@
|
||||
<data name="SettingsPageAlignment.Header" xml:space="preserve">
|
||||
<value>アライメント</value>
|
||||
</data>
|
||||
<data name="SettingsPageAlwaysHideUnlockButton.Header" xml:space="preserve">
|
||||
<value>ロック解除ボタンは常に隠しておきましょう</value>
|
||||
</data>
|
||||
<data name="SettingsPageAmllTtmlDbBaseUrl.Header" xml:space="preserve">
|
||||
<value>ベースURL</value>
|
||||
</data>
|
||||
@@ -1509,6 +1512,9 @@
|
||||
<data name="SettingsPageStartup.Text" xml:space="preserve">
|
||||
<value>起動</value>
|
||||
</data>
|
||||
<data name="SettingsPageStopTrackOnGalleryWindowClosed.Header" xml:space="preserve">
|
||||
<value>音楽ライブラリが閉じられたら、再生を停止してください</value>
|
||||
</data>
|
||||
<data name="SettingsPageStrokeFontColor.Header" xml:space="preserve">
|
||||
<value>ストロークカラー</value>
|
||||
</data>
|
||||
|
||||
@@ -630,6 +630,9 @@
|
||||
<data name="SettingsPageAlignment.Header" xml:space="preserve">
|
||||
<value>조정</value>
|
||||
</data>
|
||||
<data name="SettingsPageAlwaysHideUnlockButton.Header" xml:space="preserve">
|
||||
<value>항상 잠금 해제 버튼을 숨깁니다</value>
|
||||
</data>
|
||||
<data name="SettingsPageAmllTtmlDbBaseUrl.Header" xml:space="preserve">
|
||||
<value>기본 URL</value>
|
||||
</data>
|
||||
@@ -1509,6 +1512,9 @@
|
||||
<data name="SettingsPageStartup.Text" xml:space="preserve">
|
||||
<value>시작</value>
|
||||
</data>
|
||||
<data name="SettingsPageStopTrackOnGalleryWindowClosed.Header" xml:space="preserve">
|
||||
<value>음악 라이브러리가 닫히면 재생을 중지하십시오</value>
|
||||
</data>
|
||||
<data name="SettingsPageStrokeFontColor.Header" xml:space="preserve">
|
||||
<value>윤곽선 색상</value>
|
||||
</data>
|
||||
|
||||
@@ -630,6 +630,9 @@
|
||||
<data name="SettingsPageAlignment.Header" xml:space="preserve">
|
||||
<value>对齐方式</value>
|
||||
</data>
|
||||
<data name="SettingsPageAlwaysHideUnlockButton.Header" xml:space="preserve">
|
||||
<value>总是隐藏解锁按钮</value>
|
||||
</data>
|
||||
<data name="SettingsPageAmllTtmlDbBaseUrl.Header" xml:space="preserve">
|
||||
<value>基本 URL</value>
|
||||
</data>
|
||||
@@ -1509,6 +1512,9 @@
|
||||
<data name="SettingsPageStartup.Text" xml:space="preserve">
|
||||
<value>启动</value>
|
||||
</data>
|
||||
<data name="SettingsPageStopTrackOnGalleryWindowClosed.Header" xml:space="preserve">
|
||||
<value>关闭音乐库时停止播放</value>
|
||||
</data>
|
||||
<data name="SettingsPageStrokeFontColor.Header" xml:space="preserve">
|
||||
<value>描边颜色</value>
|
||||
</data>
|
||||
|
||||
@@ -630,6 +630,9 @@
|
||||
<data name="SettingsPageAlignment.Header" xml:space="preserve">
|
||||
<value>對齊方式</value>
|
||||
</data>
|
||||
<data name="SettingsPageAlwaysHideUnlockButton.Header" xml:space="preserve">
|
||||
<value>總是隱藏解鎖按鈕</value>
|
||||
</data>
|
||||
<data name="SettingsPageAmllTtmlDbBaseUrl.Header" xml:space="preserve">
|
||||
<value>基本網址</value>
|
||||
</data>
|
||||
@@ -1509,6 +1512,9 @@
|
||||
<data name="SettingsPageStartup.Text" xml:space="preserve">
|
||||
<value>啟動</value>
|
||||
</data>
|
||||
<data name="SettingsPageStopTrackOnGalleryWindowClosed.Header" xml:space="preserve">
|
||||
<value>關閉音樂庫時停止播放</value>
|
||||
</data>
|
||||
<data name="SettingsPageStrokeFontColor.Header" xml:space="preserve">
|
||||
<value>描邊顏色</value>
|
||||
</data>
|
||||
|
||||
@@ -178,7 +178,10 @@ namespace BetterLyrics.WinUI3.Views
|
||||
private void Page_Unloaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ViewModel.CancelRefreshSongs();
|
||||
ViewModel.StopTrackCommand.Execute(null);
|
||||
if (ViewModel.AppSettings.MusicGallerySettings.StopOnWindowClosed)
|
||||
{
|
||||
ViewModel.StopTrackCommand.Execute(null);
|
||||
}
|
||||
}
|
||||
|
||||
private void PlaylistFavButton_Click(object sender, RoutedEventArgs e)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors"
|
||||
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dev="using:DevWinUI"
|
||||
xmlns:local="using:BetterLyrics.WinUI3.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:media="using:CommunityToolkit.WinUI.Media"
|
||||
@@ -28,7 +29,7 @@
|
||||
<Grid
|
||||
x:Name="TopCommandGrid"
|
||||
VerticalAlignment="Top"
|
||||
Background="{ThemeResource AcrylicInAppFillColorDefaultBrush}"
|
||||
Background="{ThemeResource LayerOnMicaBaseAltFillColorDefaultBrush}"
|
||||
Opacity="{x:Bind ViewModel.TopCommandGridOpacity, Mode=OneWay}"
|
||||
PointerEntered="TopCommandGrid_PointerEntered"
|
||||
PointerExited="TopCommandGrid_PointerExited">
|
||||
|
||||
@@ -87,6 +87,7 @@ namespace BetterLyrics.WinUI3.Views
|
||||
OnAutoShowOrHideWindowChanged();
|
||||
OnTitleBarAreaChanged();
|
||||
OnIsPinToTaskbarChanged();
|
||||
OnIsAlwaysHideUnlockButtonChanged();
|
||||
|
||||
LyricsWindowStatus.UpdateDemoWindowAndMonitorBounds();
|
||||
}
|
||||
@@ -200,6 +201,11 @@ namespace BetterLyrics.WinUI3.Views
|
||||
}
|
||||
}
|
||||
|
||||
private void OnIsAlwaysHideUnlockButtonChanged()
|
||||
{
|
||||
UnlockButton.Visibility = LyricsWindowStatus.IsAlwaysHideUnlockButton ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
|
||||
private void OnIsFullscreenChanged()
|
||||
{
|
||||
if (this.SetIsFullscreen(LyricsWindowStatus.IsFullscreen))
|
||||
@@ -504,6 +510,10 @@ namespace BetterLyrics.WinUI3.Views
|
||||
{
|
||||
OnIsPinToTaskbarChanged();
|
||||
}
|
||||
else if (message.PropertyName == nameof(LyricsWindowStatus.IsAlwaysHideUnlockButton))
|
||||
{
|
||||
OnIsAlwaysHideUnlockButtonChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user