add: user can set lyrics color now (choose one from album art accent colors)
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 721 B After Width: | Height: | Size: 824 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 721 B After Width: | Height: | Size: 824 B |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 531 B After Width: | Height: | Size: 599 B |
|
Before Width: | Height: | Size: 703 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 46 KiB |
@@ -5,12 +5,13 @@
|
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
|
||||
IgnorableNamespaces="uap rescap">
|
||||
xmlns:uap18="http://schemas.microsoft.com/appx/manifest/uap/windows10/18"
|
||||
IgnorableNamespaces="uap rescap uap18">
|
||||
|
||||
<Identity
|
||||
Name="37412.BetterLyrics"
|
||||
Publisher="CN=E1428B0E-DC1D-4EA4-ACB1-4556569D5BA9"
|
||||
Version="1.0.0.0" />
|
||||
Version="1.0.1.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="ca4a4830-fc19-40d9-b823-53e2bff3d816" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
@@ -26,7 +27,9 @@
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="x-generate"/>
|
||||
<Resource Language="en-US"/>
|
||||
<Resource Language="zh-CN"/>
|
||||
<Resource Language="zh-TW"/>
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
<converter:ColorToBrushConverter x:Key="ColorToBrushConverter" />
|
||||
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
|
||||
<converters:BoolNegationConverter x:Key="BoolNegationConverter" />
|
||||
<converters:ColorToDisplayNameConverter x:Key="ColorToDisplayNameConverter" />
|
||||
|
||||
<x:Double x:Key="SettingsCardSpacing">4</x:Double>
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 334 B |
BIN
BetterLyrics.WinUI3/BetterLyrics.WinUI3/Assets/Logo.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
@@ -1,69 +1,67 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net8.0-windows10.0.26100.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<RootNamespace>BetterLyrics.WinUI3</RootNamespace>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<Platforms>x86;x64;ARM64</Platforms>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<UseWinUI>true</UseWinUI>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Manifest Include="$(ApplicationManifest)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Labs.WinUI.MarqueeText" Version="0.1.230830" />
|
||||
<PackageReference Include="CommunityToolkit.Labs.WinUI.OpacityMaskView" Version="0.1.250513-build.2126" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Behaviors" Version="8.2.250402" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.2.250402" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Converters" Version="8.2.250402" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Extensions" Version="8.2.250402" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Helpers" Version="8.2.250402" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Media" Version="8.2.250402" />
|
||||
<PackageReference Include="DevWinUI" Version="8.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.5" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.5" />
|
||||
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.3.2" />
|
||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.4188" />
|
||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.7.250513003" />
|
||||
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="3.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="Serilog.Extensions.Logging" Version="9.0.2" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
|
||||
<PackageReference Include="sqlite-net-pcl" Version="1.9.172" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="9.0.5" />
|
||||
<PackageReference Include="Ude.NetStandard" Version="1.2.0" />
|
||||
<PackageReference Include="z440.atl.core" Version="6.24.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="Assets\Icon.png">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="Assets\AI - 甜度爆表.mp3">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Publish Properties -->
|
||||
<PropertyGroup>
|
||||
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
|
||||
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
|
||||
<PublishTrimmed Condition="'$(Configuration)' == 'Debug'">False</PublishTrimmed>
|
||||
<PublishTrimmed Condition="'$(Configuration)' != 'Debug'">True</PublishTrimmed>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<DefineConstants>$(DefineConstants);DISABLE_XAML_GENERATED_MAIN</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net8.0-windows10.0.26100.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<RootNamespace>BetterLyrics.WinUI3</RootNamespace>
|
||||
<Platforms>x86;x64;ARM64</Platforms>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<UseWinUI>true</UseWinUI>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Logo.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Manifest Include="$(ApplicationManifest)" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Labs.WinUI.MarqueeText" Version="0.1.230830" />
|
||||
<PackageReference
|
||||
Include="CommunityToolkit.Labs.WinUI.OpacityMaskView"
|
||||
Version="0.1.250513-build.2126"
|
||||
/>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Behaviors" Version="8.2.250402" />
|
||||
<PackageReference
|
||||
Include="CommunityToolkit.WinUI.Controls.SettingsControls"
|
||||
Version="8.2.250402"
|
||||
/>
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Converters" Version="8.2.250402" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Extensions" Version="8.2.250402" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Helpers" Version="8.2.250402" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Media" Version="8.2.250402" />
|
||||
<PackageReference Include="DevWinUI" Version="8.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.5" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.5" />
|
||||
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.3.2" />
|
||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.4188" />
|
||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.7.250513003" />
|
||||
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="3.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="Serilog.Extensions.Logging" Version="9.0.2" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
|
||||
<PackageReference Include="sqlite-net-pcl" Version="1.9.172" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="9.0.5" />
|
||||
<PackageReference Include="Ude.NetStandard" Version="1.2.0" />
|
||||
<PackageReference Include="z440.atl.core" Version="6.24.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Update="Assets\AI - 甜度爆表.mp3">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<!-- Publish Properties -->
|
||||
<PropertyGroup>
|
||||
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
|
||||
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
|
||||
<PublishTrimmed Condition="'$(Configuration)' == 'Debug'">False</PublishTrimmed>
|
||||
<PublishTrimmed Condition="'$(Configuration)' != 'Debug'">True</PublishTrimmed>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<DefineConstants>$(DefineConstants);DISABLE_XAML_GENERATED_MAIN</DefineConstants>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<ApplicationIcon>Logo.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
||||
@@ -118,9 +118,9 @@ namespace BetterLyrics.WinUI3.Helper
|
||||
return max;
|
||||
}
|
||||
|
||||
public Color FromRgb(int red, int green, int blue)
|
||||
public RGB FromRgb(int red, int green, int blue)
|
||||
{
|
||||
var color = new Color
|
||||
var color = new RGB
|
||||
{
|
||||
A = 255,
|
||||
R = (byte)red,
|
||||
@@ -135,7 +135,7 @@ namespace BetterLyrics.WinUI3.Helper
|
||||
/// <summary>
|
||||
/// Defines a color in RGB space.
|
||||
/// </summary>
|
||||
public struct Color
|
||||
public struct RGB
|
||||
{
|
||||
/// <summary>
|
||||
/// Get or Set the Alpha component value for sRGB.
|
||||
@@ -663,18 +663,18 @@ namespace BetterLyrics.WinUI3.Helper
|
||||
|
||||
public class QuantizedColor
|
||||
{
|
||||
public QuantizedColor(Color color, int population)
|
||||
public QuantizedColor(RGB color, int population)
|
||||
{
|
||||
Color = color;
|
||||
Population = population;
|
||||
IsDark = CalculateYiqLuma(color) < 128;
|
||||
}
|
||||
|
||||
public Color Color { get; private set; }
|
||||
public RGB Color { get; private set; }
|
||||
public int Population { get; private set; }
|
||||
public bool IsDark { get; private set; }
|
||||
|
||||
public int CalculateYiqLuma(Color color)
|
||||
public int CalculateYiqLuma(RGB color)
|
||||
{
|
||||
return Convert.ToInt32(
|
||||
Math.Round((299 * color.R + 587 * color.G + 114 * color.B) / 1000f)
|
||||
@@ -930,7 +930,7 @@ namespace BetterLyrics.WinUI3.Helper
|
||||
var palette = await GetPalette(sourceImage, 3, quality, ignoreWhite);
|
||||
|
||||
var dominantColor = new QuantizedColor(
|
||||
new Color
|
||||
new RGB
|
||||
{
|
||||
A = Convert.ToByte(palette.Average(a => a.Color.A)),
|
||||
R = Convert.ToByte(palette.Average(a => a.Color.R)),
|
||||
|
||||
BIN
BetterLyrics.WinUI3/BetterLyrics.WinUI3/Logo.ico
Normal file
|
After Width: | Height: | Size: 201 KiB |
@@ -57,6 +57,21 @@
|
||||
</interactivity:Interaction.Behaviors>
|
||||
|
||||
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
||||
|
||||
<ImageIcon
|
||||
Height="24"
|
||||
Margin="16,0"
|
||||
Source="ms-appx:///Assets/Logo.png" />
|
||||
|
||||
<TextBlock
|
||||
x:Name="AppTitleTextBlock"
|
||||
Margin="0,-4,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Bind Title}" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<!-- Always On Top -->
|
||||
<AppBarButton
|
||||
x:Name="AOTButton"
|
||||
@@ -89,15 +104,6 @@
|
||||
</Grid>
|
||||
</AppBarButton>
|
||||
|
||||
<TextBlock
|
||||
x:Name="AppTitleTextBlock"
|
||||
Margin="0,-4,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Bind Title}" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<!-- Window Mini -->
|
||||
<AppBarButton
|
||||
x:Name="MiniButton"
|
||||
|
||||
@@ -243,7 +243,11 @@ namespace BetterLyrics.WinUI3.Services.Settings
|
||||
SettingsKeys.LyricsFontSelectedAccentColorIndex,
|
||||
SettingsDefaultValues.LyricsFontSelectedAccentColorIndex
|
||||
);
|
||||
set => Set(SettingsKeys.LyricsFontSelectedAccentColorIndex, value);
|
||||
set
|
||||
{
|
||||
if (value >= 0)
|
||||
Set(SettingsKeys.LyricsFontSelectedAccentColorIndex, value);
|
||||
}
|
||||
}
|
||||
|
||||
private T? Get<T>(string key, T? defaultValue = default)
|
||||
|
||||
@@ -28,10 +28,7 @@ using static CommunityToolkit.WinUI.Animations.Expressions.ExpressionValues;
|
||||
|
||||
namespace BetterLyrics.WinUI3.ViewModels
|
||||
{
|
||||
public partial class MainViewModel(
|
||||
SettingsService settingsService,
|
||||
DatabaseService databaseService
|
||||
) : ObservableObject
|
||||
public partial class MainViewModel : ObservableObject
|
||||
{
|
||||
[ObservableProperty]
|
||||
private bool _isAnyMusicSessionExisted = false;
|
||||
@@ -43,12 +40,7 @@ namespace BetterLyrics.WinUI3.ViewModels
|
||||
private string? _artist;
|
||||
|
||||
[ObservableProperty]
|
||||
private ObservableCollection<Windows.UI.Color> _coverImageDominantColors =
|
||||
[
|
||||
Colors.Transparent,
|
||||
Colors.Transparent,
|
||||
Colors.Transparent,
|
||||
];
|
||||
private ObservableCollection<Color> _coverImageDominantColors;
|
||||
|
||||
[ObservableProperty]
|
||||
private BitmapImage? _coverImage;
|
||||
@@ -65,10 +57,22 @@ namespace BetterLyrics.WinUI3.ViewModels
|
||||
[ObservableProperty]
|
||||
private bool _lyricsExisted = false;
|
||||
|
||||
private readonly Helper.ColorThief _colorThief = new();
|
||||
private readonly ColorThief _colorThief = new();
|
||||
|
||||
private readonly SettingsService _settingsService = settingsService;
|
||||
private readonly DatabaseService _databaseService = databaseService;
|
||||
private readonly SettingsService _settingsService;
|
||||
private readonly DatabaseService _databaseService;
|
||||
|
||||
private readonly int _accentColorCount = 3;
|
||||
|
||||
public MainViewModel(SettingsService settingsService, DatabaseService databaseService)
|
||||
{
|
||||
_settingsService = settingsService;
|
||||
_databaseService = databaseService;
|
||||
CoverImageDominantColors =
|
||||
[
|
||||
.. Enumerable.Repeat(Colors.Transparent, _accentColorCount),
|
||||
];
|
||||
}
|
||||
|
||||
public List<LyricsLine> GetLyrics(Track? track)
|
||||
{
|
||||
@@ -165,8 +169,10 @@ namespace BetterLyrics.WinUI3.ViewModels
|
||||
CoverImage = null;
|
||||
CoverImageDominantColors =
|
||||
[
|
||||
.. Enumerable.Repeat(Microsoft.UI.Colors.Transparent, 3),
|
||||
.. Enumerable.Repeat(Colors.Transparent, _accentColorCount),
|
||||
];
|
||||
_settingsService.LyricsFontSelectedAccentColorIndex =
|
||||
_settingsService.LyricsFontSelectedAccentColorIndex;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -185,15 +191,12 @@ namespace BetterLyrics.WinUI3.ViewModels
|
||||
|
||||
CoverImageDominantColors =
|
||||
[
|
||||
.. (await _colorThief.GetPalette(decoder, 3)).Select(quantizedColor =>
|
||||
Windows.UI.Color.FromArgb(
|
||||
quantizedColor.Color.A,
|
||||
quantizedColor.Color.R,
|
||||
quantizedColor.Color.G,
|
||||
quantizedColor.Color.B
|
||||
)
|
||||
.. (await _colorThief.GetPalette(decoder, _accentColorCount)).Select(color =>
|
||||
Color.FromArgb(color.Color.A, color.Color.R, color.Color.G, color.Color.B)
|
||||
),
|
||||
];
|
||||
_settingsService.LyricsFontSelectedAccentColorIndex =
|
||||
_settingsService.LyricsFontSelectedAccentColorIndex;
|
||||
|
||||
stream.Dispose();
|
||||
}
|
||||
|
||||
@@ -183,7 +183,13 @@ namespace BetterLyrics.WinUI3.Views
|
||||
break;
|
||||
case LyricsFontColorType.Dominant:
|
||||
_lyricsColor = ViewModel.CoverImageDominantColors[
|
||||
SettingsService.LyricsFontSelectedAccentColorIndex
|
||||
Math.Max(
|
||||
0,
|
||||
Math.Min(
|
||||
ViewModel.CoverImageDominantColors.Count - 1,
|
||||
SettingsService.LyricsFontSelectedAccentColorIndex
|
||||
)
|
||||
)
|
||||
];
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -266,14 +266,22 @@
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<GridViewItem>
|
||||
<Border
|
||||
Width="64"
|
||||
Height="64"
|
||||
CornerRadius="4">
|
||||
<Border.Background>
|
||||
<SolidColorBrush Color="{Binding}" />
|
||||
</Border.Background>
|
||||
</Border>
|
||||
<StackPanel>
|
||||
<Border
|
||||
Width="64"
|
||||
Height="64"
|
||||
CornerRadius="4">
|
||||
<Border.Background>
|
||||
<SolidColorBrush Color="{Binding}" />
|
||||
</Border.Background>
|
||||
</Border>
|
||||
<TextBlock
|
||||
Margin="4,0,4,4"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Converter={StaticResource ColorToDisplayNameConverter}}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
</StackPanel>
|
||||
</GridViewItem>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
@@ -380,7 +388,7 @@
|
||||
|
||||
<TextBlock x:Uid="SettingsPageAbout" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" />
|
||||
|
||||
<controls:SettingsCard Header="BetterLyrics" HeaderIcon="{ui:BitmapIcon Source=ms-appx:///Assets/Icon.png}">
|
||||
<controls:SettingsCard Header="BetterLyrics" HeaderIcon="{ui:BitmapIcon Source=ms-appx:///Assets/Logo.png}">
|
||||
<controls:SettingsCard.Description>
|
||||
<RichTextBlock>
|
||||
<Paragraph>
|
||||
|
||||