chores: add animation when switching color picker type, enable line fade by default, default to MedianCut, edit displayed text for color picker type for better direct understanding for users.

This commit is contained in:
Zhe Fang
2025-10-23 21:47:37 -04:00
parent a394527f80
commit 786d23b320
10 changed files with 57 additions and 14 deletions

View File

@@ -114,15 +114,15 @@
Value="{x:Bind LyricsBackgroundSettings.FluidOverlayOpacity, Mode=TwoWay}" />
</controls:SettingsCard>
<controls:SettingsCard x:Uid="SettingsPagePaletteGeneratorType">
<ComboBox SelectedIndex="{x:Bind LyricsBackgroundSettings.PaletteGeneratorType, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
<ComboBoxItem x:Uid="SettingsPageMedianCut" />
<ComboBoxItem x:Uid="SettingsPageOctTree" />
</ComboBox>
</controls:SettingsCard>
</controls:SettingsExpander.Items>
</controls:SettingsExpander>
<controls:SettingsCard x:Uid="SettingsPagePaletteGeneratorType" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=&#xE790;}">
<ComboBox SelectedIndex="{x:Bind LyricsBackgroundSettings.PaletteGeneratorType, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
<ComboBoxItem Content="MedianCut" />
<ComboBoxItem Content="OctTree" />
</ComboBox>
</controls:SettingsCard>
<controls:SettingsExpander
x:Uid="SettingsPageSpectrumLayer"

View File

@@ -92,6 +92,7 @@ namespace BetterLyrics.WinUI3.Helper
_ => throw new ArgumentOutOfRangeException(nameof(generatorType)),
};
}
public static Task<PaletteResult> GetAccentColorsAsync(BitmapDecoder decoder, int count, PaletteGeneratorType generatorType, bool? isDark = null)
{
return generatorType switch

View File

@@ -28,7 +28,7 @@ namespace BetterLyrics.WinUI3.Models.Settings
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsSpectrumOverlayEnabled { get; set; } = false;
[ObservableProperty][NotifyPropertyChangedRecipients] public partial PaletteGeneratorType PaletteGeneratorType { get; set; } = PaletteGeneratorType.OctTree;
[ObservableProperty][NotifyPropertyChangedRecipients] public partial PaletteGeneratorType PaletteGeneratorType { get; set; } = PaletteGeneratorType.MedianCut;
public LyricsBackgroundSettings() { }

View File

@@ -12,7 +12,7 @@ namespace BetterLyrics.WinUI3.Models.Settings
{
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsBlurAmount { get; set; } = 5;
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsLyricsLineFadeEnabled { get; set; } = false;
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsLyricsLineFadeEnabled { get; set; } = true;
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsLyricsGlowEffectEnabled { get; set; } = true;
[ObservableProperty][NotifyPropertyChangedRecipients] public partial LineRenderingType LyricsGlowEffectScope { get; set; } = LineRenderingType.CurrentChar;

View File

@@ -36,6 +36,7 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
IRecipient<PropertyChangedMessage<bool>>,
IRecipient<PropertyChangedMessage<string>>,
IRecipient<PropertyChangedMessage<LyricsWindowStatus>>,
IRecipient<PropertyChangedMessage<PaletteGeneratorType>>,
IRecipient<PropertyChangedMessage<ChineseRomanization>>,
IRecipient<PropertyChangedMessage<List<string>>>
{
@@ -685,5 +686,16 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
}
}
}
public void Receive(PropertyChangedMessage<PaletteGeneratorType> message)
{
if (message.Sender is LyricsBackgroundSettings)
{
if (message.PropertyName == nameof(LyricsBackgroundSettings.PaletteGeneratorType))
{
UpdateAlbumArt();
}
}
}
}
}

View File

@@ -976,6 +976,9 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
<data name="SettingsPageMediaLib.Content" xml:space="preserve">
<value>Media library</value>
</data>
<data name="SettingsPageMedianCut.Content" xml:space="preserve">
<value>Conservative</value>
</data>
<data name="SettingsPageMediaSourceProvidersConfig.Header" xml:space="preserve">
<value>Monitor this playback source</value>
</data>
@@ -1006,6 +1009,9 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
<data name="SettingsPageNoBackdrop.Content" xml:space="preserve">
<value>None</value>
</data>
<data name="SettingsPageOctTree.Content" xml:space="preserve">
<value>Aggressive</value>
</data>
<data name="SettingsPageOpacity.Header" xml:space="preserve">
<value>Opacity</value>
</data>
@@ -1013,7 +1019,7 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
<value>Open in file explorer</value>
</data>
<data name="SettingsPagePaletteGeneratorType.Header" xml:space="preserve">
<value>Palette Generator Type</value>
<value>Color picker style</value>
</data>
<data name="SettingsPagePathBeIncludedInfo" xml:space="preserve">
<value>This folder is already included in the existing folder and does not need to be added again</value>

View File

@@ -976,6 +976,9 @@
<data name="SettingsPageMediaLib.Content" xml:space="preserve">
<value>メディアライブラリ</value>
</data>
<data name="SettingsPageMedianCut.Content" xml:space="preserve">
<value>保守的</value>
</data>
<data name="SettingsPageMediaSourceProvidersConfig.Header" xml:space="preserve">
<value>この再生ソースを監視します</value>
</data>
@@ -1006,6 +1009,9 @@
<data name="SettingsPageNoBackdrop.Content" xml:space="preserve">
<value>なし</value>
</data>
<data name="SettingsPageOctTree.Content" xml:space="preserve">
<value>急進的だ</value>
</data>
<data name="SettingsPageOpacity.Header" xml:space="preserve">
<value>不透明度</value>
</data>
@@ -1013,7 +1019,7 @@
<value>ファイルエクスプローラーで開きます</value>
</data>
<data name="SettingsPagePaletteGeneratorType.Header" xml:space="preserve">
<value>パレット生成器タイ</value>
<value>カラーピックスタイ</value>
</data>
<data name="SettingsPagePathBeIncludedInfo" xml:space="preserve">
<value>このフォルダーは既存のフォルダーに既に含まれており、再度追加する必要はありません</value>

View File

@@ -976,6 +976,9 @@
<data name="SettingsPageMediaLib.Content" xml:space="preserve">
<value>미디어 라이브러리</value>
</data>
<data name="SettingsPageMedianCut.Content" xml:space="preserve">
<value>안전하게</value>
</data>
<data name="SettingsPageMediaSourceProvidersConfig.Header" xml:space="preserve">
<value>이 재생 소스를 모니터링하십시오</value>
</data>
@@ -1006,6 +1009,9 @@
<data name="SettingsPageNoBackdrop.Content" xml:space="preserve">
<value>없음</value>
</data>
<data name="SettingsPageOctTree.Content" xml:space="preserve">
<value>공격적인</value>
</data>
<data name="SettingsPageOpacity.Header" xml:space="preserve">
<value>투명도</value>
</data>
@@ -1013,7 +1019,7 @@
<value>파일 탐색기에서 열립니다</value>
</data>
<data name="SettingsPagePaletteGeneratorType.Header" xml:space="preserve">
<value>팔레트 생성기 유형</value>
<value>색상 선택 스타일</value>
</data>
<data name="SettingsPagePathBeIncludedInfo" xml:space="preserve">
<value>이 폴더는 이미 기존 폴더에 포함되어 있으며 다시 추가 할 필요가 없습니다.</value>

View File

@@ -976,6 +976,9 @@
<data name="SettingsPageMediaLib.Content" xml:space="preserve">
<value>媒体库</value>
</data>
<data name="SettingsPageMedianCut.Content" xml:space="preserve">
<value>保守</value>
</data>
<data name="SettingsPageMediaSourceProvidersConfig.Header" xml:space="preserve">
<value>监听此播放源</value>
</data>
@@ -1006,6 +1009,9 @@
<data name="SettingsPageNoBackdrop.Content" xml:space="preserve">
<value>无</value>
</data>
<data name="SettingsPageOctTree.Content" xml:space="preserve">
<value>激进</value>
</data>
<data name="SettingsPageOpacity.Header" xml:space="preserve">
<value>不透明度</value>
</data>
@@ -1013,7 +1019,7 @@
<value>在文件资源管理器中打开</value>
</data>
<data name="SettingsPagePaletteGeneratorType.Header" xml:space="preserve">
<value>取色算法</value>
<value>取色风格</value>
</data>
<data name="SettingsPagePathBeIncludedInfo" xml:space="preserve">
<value>该文件夹已包含在已有文件夹中,无需再次添加</value>

View File

@@ -976,6 +976,9 @@
<data name="SettingsPageMediaLib.Content" xml:space="preserve">
<value>媒體庫</value>
</data>
<data name="SettingsPageMedianCut.Content" xml:space="preserve">
<value>保守</value>
</data>
<data name="SettingsPageMediaSourceProvidersConfig.Header" xml:space="preserve">
<value>監聽此播放來源</value>
</data>
@@ -1006,6 +1009,9 @@
<data name="SettingsPageNoBackdrop.Content" xml:space="preserve">
<value>無</value>
</data>
<data name="SettingsPageOctTree.Content" xml:space="preserve">
<value>激進</value>
</data>
<data name="SettingsPageOpacity.Header" xml:space="preserve">
<value>專輯背景層不透明度</value>
</data>
@@ -1013,7 +1019,7 @@
<value>在檔案總管中開啟</value>
</data>
<data name="SettingsPagePaletteGeneratorType.Header" xml:space="preserve">
<value>取色算法</value>
<value>取色風格</value>
</data>
<data name="SettingsPagePathBeIncludedInfo" xml:space="preserve">
<value>該資料夾已包含在已有資料夾中,無需再次添加</value>