mirror of
https://github.com/jayfunc/BetterLyrics.git
synced 2026-01-12 10:54:55 +08:00
Compare commits
23 Commits
v1.1.180.0
...
v1.1.186.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22b813e687 | ||
|
|
fda94d5020 | ||
|
|
205cbe8fb6 | ||
|
|
816f7064db | ||
|
|
132c5267b0 | ||
|
|
4e866818df | ||
|
|
9b7b56a0ee | ||
|
|
66f2da0e4c | ||
|
|
1735c6a7e6 | ||
|
|
8c06c98068 | ||
|
|
e2ac4c166c | ||
|
|
728397cafa | ||
|
|
059787a28f | ||
|
|
4c4231b48c | ||
|
|
2412927b29 | ||
|
|
f3bdbba83e | ||
|
|
4c811b12ca | ||
|
|
933103c57f | ||
|
|
718e7bdad3 | ||
|
|
42284b4f45 | ||
|
|
7da8af7c2a | ||
|
|
a4fc457065 | ||
|
|
d3c2ee592c |
291
.devin/wiki.json
Normal file
291
.devin/wiki.json
Normal file
@@ -0,0 +1,291 @@
|
||||
{
|
||||
"repo_notes": [
|
||||
{
|
||||
"content": "Always use the latest files in the repo to generate the wiki"
|
||||
}
|
||||
],
|
||||
"pages": [
|
||||
{
|
||||
"title": "Overview",
|
||||
"purpose": "Introduce BetterLyrics, its purpose as a WinUI3 lyrics display application, key features, and supported music players",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Getting Started",
|
||||
"purpose": "Guide users through installation, initial setup, and basic usage of BetterLyrics",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Installation and Deployment",
|
||||
"purpose": "Explain how to install BetterLyrics from Microsoft Store or build from source, system requirements, and supported Windows versions",
|
||||
"parent": "Getting Started",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Initial Configuration",
|
||||
"purpose": "Walk through first-time setup including media player configuration, folder selection, and basic settings",
|
||||
"parent": "Getting Started",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Architecture",
|
||||
"purpose": "Provide technical overview of BetterLyrics' internal architecture, design patterns, and component organization",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Application Entry Point and Dependency Injection",
|
||||
"purpose": "Document the App.xaml.cs entry point, service registration, and dependency injection container configuration",
|
||||
"parent": "Architecture",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Service Layer Architecture",
|
||||
"purpose": "Explain the service-oriented architecture, service interfaces, and their implementations including MediaSessionsService, LyricsSearchService, and SettingsService",
|
||||
"parent": "Architecture",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Data Models",
|
||||
"purpose": "Document core data models including LyricsLine, LyricsData, SongInfo, and configuration models",
|
||||
"parent": "Architecture",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Multi-Window System",
|
||||
"purpose": "Explain how BetterLyrics manages multiple simultaneous lyrics windows, window lifecycle, and state management",
|
||||
"parent": "Architecture",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "User Interface",
|
||||
"purpose": "Document the UI components, windows, and user interaction patterns in BetterLyrics",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Now Playing Window",
|
||||
"purpose": "Detail the main lyrics display window, its components, and integration with the rendering system",
|
||||
"parent": "User Interface",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Display Modes and Window Configurations",
|
||||
"purpose": "Explain different display modes (Standard, Desktop, Docked, Fullscreen, Narrow, Taskbar) and how to configure them",
|
||||
"parent": "User Interface",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Settings and Customization",
|
||||
"purpose": "Document the settings interface, configuration options, and how to customize lyrics appearance and behavior",
|
||||
"parent": "User Interface",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Music Gallery",
|
||||
"purpose": "Explain the local music library management feature, including playback, playlist management, and integration with media controls",
|
||||
"parent": "User Interface",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "System Tray and Global Controls",
|
||||
"purpose": "Document the system tray integration, global hotkeys, and application-wide controls",
|
||||
"parent": "User Interface",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Lyrics System",
|
||||
"purpose": "Comprehensive documentation of the lyrics acquisition, processing, and display pipeline",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Lyrics Search and Providers",
|
||||
"purpose": "Document the lyrics search system, supported providers (QQ Music, Netease, Kugou, LrcLib, Apple Music, local files), and search strategies",
|
||||
"parent": "Lyrics System",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Parsing and Translation",
|
||||
"purpose": "Explain how lyrics are parsed from different formats (LRC, QRC, TTML), translation system using LibreTranslate, and metadata matching",
|
||||
"parent": "Lyrics System",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Rendering Pipeline",
|
||||
"purpose": "Document the Win2D-based rendering system, LyricsCanvas, PlayingLineRenderer, UnplayingLineRenderer, and LyricsLayoutManager",
|
||||
"parent": "Lyrics System",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Visual Effects and Animation",
|
||||
"purpose": "Explain character-level effects (glow, float, scale), background effects (fluid, snow, fog, spectrum), and the animation transition system",
|
||||
"parent": "Lyrics System",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Media Integration",
|
||||
"purpose": "Document how BetterLyrics integrates with music players and manages media sessions",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Windows Media Transport Controls Integration",
|
||||
"purpose": "Explain how BetterLyrics uses Windows SMTC to work universally with media players",
|
||||
"parent": "Media Integration",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Supported Players and Special Configurations",
|
||||
"purpose": "List supported media players, document special configurations (Apple Music token, LX Music SSE), and player-specific handling",
|
||||
"parent": "Media Integration",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Album Art and Theme Colors",
|
||||
"purpose": "Document album art retrieval from multiple sources, color palette generation (MedianCut, OctTree), and adaptive theming",
|
||||
"parent": "Media Integration",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Internationalization",
|
||||
"purpose": "Explain the localization system, supported languages, and how resources are managed",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Development",
|
||||
"purpose": "Technical documentation for developers contributing to or extending BetterLyrics",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Build Configuration and Deployment",
|
||||
"purpose": "Document the build process, publish profiles for different architectures, CI/CD pipeline, and packaging for Microsoft Store",
|
||||
"parent": "Development",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Helper Utilities and Extensions",
|
||||
"purpose": "Document utility classes including TaskbarHook, WindowHook, ColorHelper, ImageHelper, and various extension methods",
|
||||
"parent": "Development",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "External Dependencies and Libraries",
|
||||
"purpose": "List and explain third-party dependencies including Win2D, NAudio, ATL.NET, FlaUI, and their usage in the application",
|
||||
"parent": "Development",
|
||||
"page_notes": [
|
||||
{
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
<Identity
|
||||
Name="37412.BetterLyrics"
|
||||
Publisher="CN=E1428B0E-DC1D-4EA4-ACB1-4556569D5BA9"
|
||||
Version="1.1.180.0" />
|
||||
Version="1.1.186.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="ca4a4830-fc19-40d9-b823-53e2bff3d816" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
public const string MicrosoftStore = "https://apps.microsoft.com/detail/9p1wcd1p597r";
|
||||
|
||||
public const string AuthorGitHub = "https://github.com/jayfunc";
|
||||
|
||||
|
||||
public const string BetterLyricsGitHub = $"{AuthorGitHub}/BetterLyrics";
|
||||
|
||||
|
||||
public const string ShareHub = $"{BetterLyricsGitHub}/blob/dev/ShareHub/index.md";
|
||||
public const string TermsOfService = $"{BetterLyricsGitHub}/blob/dev/TermsofService.md";
|
||||
public const string PrivacyPolicy = $"{BetterLyricsGitHub}/blob/dev/PrivacyPolicy.md";
|
||||
|
||||
@@ -3,7 +3,6 @@ using CommunityToolkit.Mvvm.DependencyInjection;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.UI.ApplicationSettings;
|
||||
|
||||
// To learn more about WinUI, the WinUI project structure,
|
||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace BetterLyrics.WinUI3.Controls
|
||||
// FontFamilies = fontFamilies;
|
||||
// });
|
||||
//});
|
||||
FontFamilies = FontHelper.SystemFontFamilies.OrderBy(x => x).ToList();
|
||||
FontFamilies = FontHelper.GetSystemFontFamilies();
|
||||
}
|
||||
|
||||
private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args)
|
||||
|
||||
@@ -195,26 +195,34 @@
|
||||
Style="{StaticResource AccentButtonStyle}" />
|
||||
</Grid>
|
||||
|
||||
<SelectorBar x:Name="ConfigSelectorBar" SelectionChanged="ConfigSelectorBar_SelectionChanged">
|
||||
<controls:Segmented
|
||||
x:Name="ConfigSegmented"
|
||||
SelectionChanged="ConfigSegmented_SelectionChanged"
|
||||
Style="{StaticResource PivotSegmentedStyle}">
|
||||
|
||||
<SelectorBarItem
|
||||
x:Name="WindowSelectorBarItem"
|
||||
x:Uid="AppSettingsControlGeneral"
|
||||
Tag="Window" />
|
||||
<SelectorBarItem
|
||||
x:Name="LayoutSelectorBarItem"
|
||||
x:Uid="SettingsPageLayout"
|
||||
Tag="Layout" />
|
||||
<SelectorBarItem
|
||||
x:Name="AlbumArtStyleSelectorBarItem"
|
||||
x:Uid="SettingsPageAlbumStyle"
|
||||
Tag="AlbumArtStyle" />
|
||||
<SelectorBarItem x:Uid="SettingsPageAlbumEffect" Tag="AlbumArtEffect" />
|
||||
<SelectorBarItem x:Uid="SettingsPageLyricsStyle" Tag="LyricsStyle" />
|
||||
<SelectorBarItem x:Uid="SettingsPageLyricsEffect" Tag="LyricsEffect" />
|
||||
<SelectorBarItem x:Uid="SettingsPageBackgroundOverlay" Tag="LyricsBackground" />
|
||||
<controls:SegmentedItem x:Name="WindowSegmentedItem" Tag="Window">
|
||||
<TextBlock x:Uid="AppSettingsControlGeneral" />
|
||||
</controls:SegmentedItem>
|
||||
<controls:SegmentedItem x:Name="LayoutSegmentedItem" Tag="Layout">
|
||||
<TextBlock x:Uid="SettingsPageLayout" />
|
||||
</controls:SegmentedItem>
|
||||
<controls:SegmentedItem x:Name="AlbumArtStyleSegmentedItem" Tag="AlbumArtStyle">
|
||||
<TextBlock x:Uid="SettingsPageAlbumStyle" />
|
||||
</controls:SegmentedItem>
|
||||
<controls:SegmentedItem Tag="AlbumArtEffect">
|
||||
<TextBlock x:Uid="SettingsPageAlbumEffect" />
|
||||
</controls:SegmentedItem>
|
||||
<controls:SegmentedItem Tag="LyricsStyle">
|
||||
<TextBlock x:Uid="SettingsPageLyricsStyle" />
|
||||
</controls:SegmentedItem>
|
||||
<controls:SegmentedItem Tag="LyricsEffect">
|
||||
<TextBlock x:Uid="SettingsPageLyricsEffect" />
|
||||
</controls:SegmentedItem>
|
||||
<controls:SegmentedItem Tag="LyricsBackground">
|
||||
<TextBlock x:Uid="SettingsPageBackgroundOverlay" />
|
||||
</controls:SegmentedItem>
|
||||
|
||||
</SelectorBar>
|
||||
</controls:Segmented>
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
@@ -6,6 +6,7 @@ using BetterLyrics.WinUI3.Services.SettingsService;
|
||||
using BetterLyrics.WinUI3.ViewModels;
|
||||
using BetterLyrics.WinUI3.Views;
|
||||
using CommunityToolkit.Mvvm.DependencyInjection;
|
||||
using CommunityToolkit.WinUI.Controls;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Input;
|
||||
@@ -151,16 +152,16 @@ namespace BetterLyrics.WinUI3.Controls
|
||||
|
||||
private void ConfigButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
WindowSelectorBarItem.Visibility = LayoutSelectorBarItem.Visibility = Visibility.Visible;
|
||||
ConfigSelectorBar.SelectedItem = WindowSelectorBarItem;
|
||||
WindowSegmentedItem.IsEnabled = LayoutSegmentedItem.IsEnabled = true;
|
||||
ConfigSegmented.SelectedItem = WindowSegmentedItem;
|
||||
LyricsWindowStatus = (LyricsWindowStatus)((Button)sender).DataContext;
|
||||
ViewModel.OpenConfigPanel();
|
||||
}
|
||||
|
||||
private void EmbeddedConfigButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
WindowSelectorBarItem.Visibility = LayoutSelectorBarItem.Visibility = Visibility.Collapsed;
|
||||
ConfigSelectorBar.SelectedItem = AlbumArtStyleSelectorBarItem;
|
||||
WindowSegmentedItem.IsEnabled = LayoutSegmentedItem.IsEnabled = false;
|
||||
ConfigSegmented.SelectedItem = AlbumArtStyleSegmentedItem;
|
||||
LyricsWindowStatus = _settingsService.AppSettings.MusicGallerySettings.LyricsWindowStatus;
|
||||
ViewModel.OpenConfigPanel();
|
||||
}
|
||||
@@ -207,5 +208,10 @@ namespace BetterLyrics.WinUI3.Controls
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ConfigSegmented_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
ViewModel.SelectorBarSelectedItemTag = (string)((SegmentedItem)((Segmented)sender).SelectedItem).Tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace BetterLyrics.WinUI3.Enums
|
||||
namespace BetterLyrics.WinUI3.Enums
|
||||
{
|
||||
public enum TaskbarPlacement
|
||||
{
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Windows.Foundation;
|
||||
|
||||
namespace BetterLyrics.WinUI3.Events
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Drawing;
|
||||
using Windows.Foundation;
|
||||
|
||||
namespace BetterLyrics.WinUI3.Extensions
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using Microsoft.Graphics.Canvas.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
|
||||
@@ -8,8 +10,6 @@ namespace BetterLyrics.WinUI3.Helper
|
||||
{
|
||||
public static class FontHelper
|
||||
{
|
||||
public static string[] SystemFontFamilies => CanvasTextFormat.GetSystemFontFamilies().Order().ToArray();
|
||||
|
||||
public static string GetLocalizedFontFamilyName(string sourceName, string langCode)
|
||||
{
|
||||
if (langCode == "")
|
||||
@@ -33,5 +33,20 @@ namespace BetterLyrics.WinUI3.Helper
|
||||
|
||||
return sourceName;
|
||||
}
|
||||
|
||||
public static List<string> GetSystemFontFamilies()
|
||||
{
|
||||
List<string> fontFamilies = new();
|
||||
|
||||
foreach (var font in Fonts.SystemFontFamilies)
|
||||
{
|
||||
if (font.FamilyNames.TryGetValue(XmlLanguage.GetLanguage("en-us"), out string englishFamilyName))
|
||||
{
|
||||
fontFamilies.Add(englishFamilyName);
|
||||
}
|
||||
}
|
||||
|
||||
return fontFamilies.Order().ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using BetterLyrics.WinUI3.Enums;
|
||||
using BetterLyrics.WinUI3.Events;
|
||||
using BetterLyrics.WinUI3.Extensions;
|
||||
using FlaUI.Core;
|
||||
using FlaUI.Core.AutomationElements;
|
||||
using FlaUI.Core.Definitions;
|
||||
using FlaUI.Core.EventHandlers;
|
||||
using FlaUI.UIA3;
|
||||
using FlaUI.UIA3.Extensions;
|
||||
using Microsoft.UI.Dispatching;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
@@ -14,7 +12,7 @@ using System.Threading;
|
||||
|
||||
namespace BetterLyrics.WinUI3.Hooks
|
||||
{
|
||||
public class TaskbarHook : IDisposable
|
||||
public partial class TaskbarHook : IDisposable
|
||||
{
|
||||
private readonly UIA3Automation _automation;
|
||||
private AutomationElement? _taskbar;
|
||||
|
||||
@@ -9,7 +9,6 @@ using Microsoft.UI.Windowing;
|
||||
using Microsoft.UI.Xaml;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using Vanara.PInvoke;
|
||||
using Windows.ApplicationModel.Core;
|
||||
@@ -283,23 +282,27 @@ namespace BetterLyrics.WinUI3.Hooks
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetIsFullscreen(this Window window, bool enable)
|
||||
public static bool SetIsFullscreen(this Window window, bool enable, bool defaultExtendsContentIntoTitleBar = true)
|
||||
{
|
||||
if (window.AppWindow == null) return;
|
||||
if (window.AppWindow == null) return false;
|
||||
|
||||
if (enable)
|
||||
{
|
||||
window.ExtendsContentIntoTitleBar = false;
|
||||
window.AppWindow.SetPresenter(AppWindowPresenterKind.FullScreen);
|
||||
}
|
||||
else
|
||||
{
|
||||
window.ExtendsContentIntoTitleBar = defaultExtendsContentIntoTitleBar;
|
||||
window.AppWindow.SetPresenter(AppWindowPresenterKind.Overlapped);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void SetIsMaximized(this Window window, bool enable)
|
||||
public static bool SetIsMaximized(this Window window, bool enable)
|
||||
{
|
||||
if (window.AppWindow == null) return;
|
||||
if (window.AppWindow == null) return false;
|
||||
|
||||
if (enable)
|
||||
{
|
||||
@@ -309,6 +312,8 @@ namespace BetterLyrics.WinUI3.Hooks
|
||||
{
|
||||
window.Restore();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void SetIsShowInSwitchers(this Window window, bool enable)
|
||||
|
||||
@@ -52,15 +52,74 @@ namespace BetterLyrics.WinUI3.Models
|
||||
|
||||
public LyricsWindowStatus()
|
||||
{
|
||||
|
||||
LyricsStyleSettings.PropertyChanged += LyricsStyleSettings_PropertyChanged;
|
||||
LyricsEffectSettings.PropertyChanged += LyricsEffectSettings_PropertyChanged;
|
||||
LyricsBackgroundSettings.PropertyChanged += LyricsBackgroundSettings_PropertyChanged;
|
||||
AlbumArtLayoutSettings.PropertyChanged += AlbumArtLayoutSettings_PropertyChanged;
|
||||
AlbumArtAreaEffectSettings.PropertyChanged += AlbumArtAreaEffectSettings_PropertyChanged;
|
||||
}
|
||||
|
||||
public LyricsWindowStatus(Window? targetWindow = null)
|
||||
public LyricsWindowStatus(Window? targetWindow = null) : this()
|
||||
{
|
||||
UpdateMonitorNameAndBounds(targetWindow);
|
||||
UpdateDemoWindowAndMonitorBounds();
|
||||
}
|
||||
|
||||
partial void OnLyricsStyleSettingsChanged(LyricsStyleSettings oldValue, LyricsStyleSettings newValue)
|
||||
{
|
||||
oldValue.PropertyChanged -= LyricsStyleSettings_PropertyChanged;
|
||||
newValue.PropertyChanged += LyricsStyleSettings_PropertyChanged;
|
||||
}
|
||||
|
||||
private void LyricsStyleSettings_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
{
|
||||
OnPropertyChanged(nameof(LyricsStyleSettings));
|
||||
}
|
||||
|
||||
partial void OnLyricsEffectSettingsChanged(LyricsEffectSettings oldValue, LyricsEffectSettings newValue)
|
||||
{
|
||||
oldValue.PropertyChanged -= LyricsEffectSettings_PropertyChanged;
|
||||
newValue.PropertyChanged += LyricsEffectSettings_PropertyChanged;
|
||||
}
|
||||
|
||||
private void LyricsEffectSettings_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
{
|
||||
OnPropertyChanged(nameof(LyricsEffectSettings));
|
||||
}
|
||||
|
||||
partial void OnLyricsBackgroundSettingsChanged(LyricsBackgroundSettings oldValue, LyricsBackgroundSettings newValue)
|
||||
{
|
||||
oldValue.PropertyChanged -= LyricsBackgroundSettings_PropertyChanged;
|
||||
newValue.PropertyChanged += LyricsBackgroundSettings_PropertyChanged;
|
||||
}
|
||||
|
||||
private void LyricsBackgroundSettings_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
{
|
||||
OnPropertyChanged(nameof(LyricsBackgroundSettings));
|
||||
}
|
||||
|
||||
partial void OnAlbumArtLayoutSettingsChanged(AlbumArtAreaStyleSettings oldValue, AlbumArtAreaStyleSettings newValue)
|
||||
{
|
||||
oldValue.PropertyChanged -= AlbumArtLayoutSettings_PropertyChanged;
|
||||
newValue.PropertyChanged += AlbumArtLayoutSettings_PropertyChanged;
|
||||
}
|
||||
|
||||
private void AlbumArtLayoutSettings_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
{
|
||||
OnPropertyChanged(nameof(AlbumArtLayoutSettings));
|
||||
}
|
||||
|
||||
partial void OnAlbumArtAreaEffectSettingsChanged(AlbumArtAreaEffectSettings oldValue, AlbumArtAreaEffectSettings newValue)
|
||||
{
|
||||
oldValue.PropertyChanged -= AlbumArtAreaEffectSettings_PropertyChanged;
|
||||
newValue.PropertyChanged += AlbumArtAreaEffectSettings_PropertyChanged;
|
||||
}
|
||||
|
||||
private void AlbumArtAreaEffectSettings_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
{
|
||||
OnPropertyChanged(nameof(AlbumArtAreaEffectSettings));
|
||||
}
|
||||
|
||||
partial void OnWindowBoundsChanged(Rect value)
|
||||
{
|
||||
UpdateMonitorNameAndBounds();
|
||||
|
||||
@@ -34,8 +34,8 @@ namespace BetterLyrics.WinUI3.Models.Settings
|
||||
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial double LyricsLineSpacingFactor { get; set; } = 0.5;
|
||||
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial string LyricsCJKFontFamily { get; set; } = FontHelper.SystemFontFamilies.FirstOrDefault() ?? "";
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial string LyricsWesternFontFamily { get; set; } = FontHelper.SystemFontFamilies.FirstOrDefault() ?? "";
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial string LyricsCJKFontFamily { get; set; } = "Arial";
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial string LyricsWesternFontFamily { get; set; } = "Arial";
|
||||
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int PlayingLineTopOffset { get; set; } = 50; // 50 %
|
||||
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
using BetterLyrics.WinUI3.Enums;
|
||||
using BetterLyrics.WinUI3.Helper;
|
||||
using Microsoft.Graphics.Canvas;
|
||||
using Microsoft.Graphics.Canvas.Effects;
|
||||
using Microsoft.Graphics.Canvas.UI.Xaml;
|
||||
using System;
|
||||
using System.Numerics;
|
||||
|
||||
namespace BetterLyrics.WinUI3.Renderer
|
||||
{
|
||||
public partial class CoverBackgroundRenderer : IDisposable
|
||||
{
|
||||
private CanvasBitmap? _currentBitmap;
|
||||
private CanvasBitmap? _previousBitmap;
|
||||
|
||||
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;
|
||||
|
||||
public int Speed { get; set; } = 100;
|
||||
|
||||
public CoverBackgroundRenderer()
|
||||
{
|
||||
_crossfadeTransition = new ValueTransition<double>(1.0, 0.7, easingType: EasingType.Linear);
|
||||
}
|
||||
|
||||
public void SetCoverBitmap(CanvasBitmap? newBitmap)
|
||||
{
|
||||
if (_currentBitmap == newBitmap) return;
|
||||
|
||||
if (_currentBitmap == null)
|
||||
{
|
||||
_currentBitmap = newBitmap;
|
||||
_crossfadeTransition.StartTransition(1.0, jumpTo: true);
|
||||
return;
|
||||
}
|
||||
|
||||
_previousBitmap = _currentBitmap;
|
||||
_currentBitmap = newBitmap;
|
||||
|
||||
if (newBitmap != null)
|
||||
{
|
||||
_crossfadeTransition.Reset(0.0);
|
||||
_crossfadeTransition.StartTransition(1.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
_previousBitmap = null;
|
||||
_crossfadeTransition.StartTransition(1.0, jumpTo: true);
|
||||
}
|
||||
}
|
||||
|
||||
public void Update(TimeSpan deltaTime)
|
||||
{
|
||||
if (!IsEnabled) return;
|
||||
|
||||
_crossfadeTransition.Update(deltaTime);
|
||||
|
||||
if (Speed > 0)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
public void Draw(ICanvasAnimatedControl control, CanvasDrawingSession ds)
|
||||
{
|
||||
if (!IsEnabled || Opacity <= 0) return;
|
||||
|
||||
float baseAlpha = Opacity / 100.0f;
|
||||
float currentBlur = BlurAmount;
|
||||
|
||||
float angle = Speed > 0 ? _rotationAngle : 0f;
|
||||
|
||||
double fadeProgress = _crossfadeTransition.Value;
|
||||
bool isCrossfading = fadeProgress < 1.0 && _previousBitmap != null;
|
||||
|
||||
if (isCrossfading)
|
||||
{
|
||||
DrawLayer(ds, control.Size, _previousBitmap, angle, currentBlur, baseAlpha);
|
||||
|
||||
float newLayerAlpha = baseAlpha * (float)fadeProgress;
|
||||
if (newLayerAlpha > 0.005f)
|
||||
{
|
||||
DrawLayer(ds, control.Size, _currentBitmap, angle, currentBlur, newLayerAlpha);
|
||||
}
|
||||
}
|
||||
else if (_currentBitmap != null)
|
||||
{
|
||||
DrawLayer(ds, control.Size, _currentBitmap, angle, currentBlur, baseAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawLayer(CanvasDrawingSession ds, Windows.Foundation.Size screenSize, CanvasBitmap? bitmap, float rotationRadians, float blurAmount, float alpha)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
// 缩放图片 -> 将图片中心移动到 (0,0) 以便旋转 -> 旋转 ->将图片移回屏幕中心
|
||||
Vector2 imgCenterOffset = new Vector2(
|
||||
((float)screenSize.Width - imgW * scale) / 2.0f,
|
||||
((float)screenSize.Height - imgH * scale) / 2.0f
|
||||
);
|
||||
|
||||
Matrix3x2 transform =
|
||||
Matrix3x2.CreateScale(scale) * Matrix3x2.CreateTranslation(imgCenterOffset) * Matrix3x2.CreateRotation(rotationRadians, screenCenter);
|
||||
|
||||
using (var transformEffect = new Transform2DEffect())
|
||||
using (var blurEffect = new GaussianBlurEffect())
|
||||
{
|
||||
transformEffect.Source = bitmap;
|
||||
transformEffect.TransformMatrix = transform;
|
||||
transformEffect.InterpolationMode = CanvasImageInterpolation.Linear;
|
||||
|
||||
blurEffect.Source = transformEffect;
|
||||
blurEffect.BlurAmount = blurAmount > 0 ? (blurAmount / 2.0f) : 0f;
|
||||
blurEffect.BorderMode = EffectBorderMode.Hard;
|
||||
|
||||
ds.DrawImage(blurEffect, 0, 0, new Windows.Foundation.Rect(0, 0, screenSize.Width, screenSize.Height), alpha);
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_currentBitmap?.Dispose();
|
||||
_currentBitmap = null;
|
||||
_previousBitmap?.Dispose();
|
||||
_previousBitmap = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -135,7 +135,8 @@ namespace BetterLyrics.WinUI3.Renderer
|
||||
var effectSettings = windowStatus.LyricsEffectSettings;
|
||||
var styleSettings = windowStatus.LyricsStyleSettings;
|
||||
|
||||
var rotationY = currentPlayingLine.OriginalPosition.WithX(effectSettings.FanLyricsAngle < 0 ? (float)lyricsWidth : 0);
|
||||
var rotationX = effectSettings.FanLyricsAngle < 0 ? lyricsWidth : 0;
|
||||
rotationX += lyricsWidth / 2 * (effectSettings.FanLyricsAngle < 0 ? 1 : -1);
|
||||
|
||||
for (int i = startVisibleIndex; i <= endVisibleIndex; i++)
|
||||
{
|
||||
@@ -145,14 +146,19 @@ namespace BetterLyrics.WinUI3.Renderer
|
||||
if (line.OriginalCanvasTextLayout == null) continue;
|
||||
if (line.OriginalCanvasTextLayout.LayoutBounds.Width <= 0) continue;
|
||||
|
||||
double xOffset = lyricsX;
|
||||
double yOffset = line.YOffsetTransition.Value + userScrollOffset + lyricsY + lyricsHeight * playingLineTopOffsetFactor;
|
||||
|
||||
var transform =
|
||||
Matrix3x2.CreateScale((float)line.ScaleTransition.Value, line.CenterPosition) *
|
||||
Matrix3x2.CreateRotation((float)line.AngleTransition.Value, rotationY) *
|
||||
Matrix3x2.CreateTranslation((float)lyricsX, (float)yOffset);
|
||||
ds.Transform = Matrix3x2.CreateScale((float)line.ScaleTransition.Value, line.CenterPosition);
|
||||
|
||||
ds.Transform = transform;
|
||||
if (effectSettings.IsFanLyricsEnabled)
|
||||
{
|
||||
xOffset += Math.Abs(line.AngleTransition.Value) / (Math.PI / 2) * lyricsWidth / 2 * (effectSettings.FanLyricsAngle < 0 ? 1 : -1);
|
||||
var rotationY = line.CenterPosition.Y;
|
||||
ds.Transform *= Matrix3x2.CreateRotation((float)line.AngleTransition.Value, new Vector2((float)rotationX, rotationY));
|
||||
}
|
||||
|
||||
ds.Transform *= Matrix3x2.CreateTranslation((float)xOffset, (float)yOffset);
|
||||
|
||||
using (var textOnlyLayer = RenderBaseTextLayer(control, line, styleSettings.LyricsFontStrokeWidth, strokeColor, line.ColorTransition.Value))
|
||||
{
|
||||
|
||||
@@ -5,7 +5,6 @@ using Microsoft.UI.Xaml.Media.Imaging;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.Graphics.Imaging;
|
||||
using Windows.UI;
|
||||
|
||||
namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
||||
|
||||
@@ -12,7 +12,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Vanara.PInvoke;
|
||||
using Windows.Graphics.Imaging;
|
||||
using Windows.Storage.Streams;
|
||||
using Windows.UI;
|
||||
@@ -22,14 +21,14 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
||||
public partial class MediaSessionsService : IMediaSessionsService
|
||||
{
|
||||
private readonly LatestOnlyTaskRunner _albumArtRefreshRunner = new();
|
||||
|
||||
|
||||
private List<Color> _lightAccentColorsMedianCut = Enumerable.Repeat(Colors.Black, 4).ToList();
|
||||
private List<Color> _darkAccentColorsMedianCut = Enumerable.Repeat(Colors.Black, 4).ToList();
|
||||
private List<Color> _lightAccentColorsOctTree = Enumerable.Repeat(Colors.Black, 4).ToList();
|
||||
private List<Color> _darkAccentColorsOctTree = Enumerable.Repeat(Colors.Black, 4).ToList();
|
||||
|
||||
private BitmapDecoder? _albumArtBitmapDecoder = null;
|
||||
|
||||
|
||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial BitmapImage? AlbumArtBitmapImage { get; set; }
|
||||
|
||||
private void UpdateAlbumArt()
|
||||
@@ -63,16 +62,16 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
||||
_albumArtBitmapDecoder = await ImageHelper.GetBitmapDecoder(buffer);
|
||||
if (token.IsCancellationRequested) return;
|
||||
|
||||
_lightAccentColorsMedianCut =
|
||||
_lightAccentColorsMedianCut =
|
||||
(await ImageHelper.GetAccentColorsAsync(_albumArtBitmapDecoder, 4, PaletteGeneratorType.MedianCut, false))
|
||||
.Palette.Select(Helper.ColorHelper.FromVector3).ToList();
|
||||
_darkAccentColorsMedianCut =
|
||||
_darkAccentColorsMedianCut =
|
||||
(await ImageHelper.GetAccentColorsAsync(_albumArtBitmapDecoder, 4, PaletteGeneratorType.MedianCut, true))
|
||||
.Palette.Select(Helper.ColorHelper.FromVector3).ToList();
|
||||
_lightAccentColorsOctTree =
|
||||
_lightAccentColorsOctTree =
|
||||
(await ImageHelper.GetAccentColorsAsync(_albumArtBitmapDecoder, 4, PaletteGeneratorType.OctTree, false))
|
||||
.Palette.Select(Helper.ColorHelper.FromVector3).ToList();
|
||||
_darkAccentColorsOctTree =
|
||||
_darkAccentColorsOctTree =
|
||||
(await ImageHelper.GetAccentColorsAsync(_albumArtBitmapDecoder, 4, PaletteGeneratorType.OctTree, true))
|
||||
.Palette.Select(Helper.ColorHelper.FromVector3).ToList();
|
||||
|
||||
|
||||
@@ -681,6 +681,9 @@
|
||||
<data name="SettingsPageBackgroundOverlay.Text" xml:space="preserve">
|
||||
<value>Lyrics background</value>
|
||||
</data>
|
||||
<data name="SettingsPageBlurAmount.Header" xml:space="preserve">
|
||||
<value>Blur amount</value>
|
||||
</data>
|
||||
<data name="SettingsPageBorderless.Header" xml:space="preserve">
|
||||
<value>Borderless window</value>
|
||||
</data>
|
||||
|
||||
@@ -681,6 +681,9 @@
|
||||
<data name="SettingsPageBackgroundOverlay.Text" xml:space="preserve">
|
||||
<value>歌詞の背景</value>
|
||||
</data>
|
||||
<data name="SettingsPageBlurAmount.Header" xml:space="preserve">
|
||||
<value>あいまい</value>
|
||||
</data>
|
||||
<data name="SettingsPageBorderless.Header" xml:space="preserve">
|
||||
<value>ボーダーレスウィンドウ</value>
|
||||
</data>
|
||||
|
||||
@@ -681,6 +681,9 @@
|
||||
<data name="SettingsPageBackgroundOverlay.Text" xml:space="preserve">
|
||||
<value>가사 배경</value>
|
||||
</data>
|
||||
<data name="SettingsPageBlurAmount.Header" xml:space="preserve">
|
||||
<value>모호함</value>
|
||||
</data>
|
||||
<data name="SettingsPageBorderless.Header" xml:space="preserve">
|
||||
<value>창문</value>
|
||||
</data>
|
||||
|
||||
@@ -681,6 +681,9 @@
|
||||
<data name="SettingsPageBackgroundOverlay.Text" xml:space="preserve">
|
||||
<value>歌词背景</value>
|
||||
</data>
|
||||
<data name="SettingsPageBlurAmount.Header" xml:space="preserve">
|
||||
<value>模糊度</value>
|
||||
</data>
|
||||
<data name="SettingsPageBorderless.Header" xml:space="preserve">
|
||||
<value>无边框窗口</value>
|
||||
</data>
|
||||
|
||||
@@ -681,6 +681,9 @@
|
||||
<data name="SettingsPageBackgroundOverlay.Text" xml:space="preserve">
|
||||
<value>歌詞背景</value>
|
||||
</data>
|
||||
<data name="SettingsPageBlurAmount.Header" xml:space="preserve">
|
||||
<value>模糊度</value>
|
||||
</data>
|
||||
<data name="SettingsPageBorderless.Header" xml:space="preserve">
|
||||
<value>無邊框窗口</value>
|
||||
</data>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using BetterLyrics.WinUI3.Helper.BetterLyrics.WinUI3.Helper;
|
||||
using BetterLyrics.WinUI3.Hooks;
|
||||
using BetterLyrics.WinUI3.Models.Settings;
|
||||
using BetterLyrics.WinUI3.Services.ResourceService;
|
||||
using BetterLyrics.WinUI3.Services.SettingsService;
|
||||
using BetterLyrics.WinUI3.Views;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
@@ -10,8 +9,6 @@ using CommunityToolkit.Mvvm.Input;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.Services.Store;
|
||||
using Windows.System;
|
||||
|
||||
namespace BetterLyrics.WinUI3.ViewModels
|
||||
{
|
||||
|
||||
@@ -11,7 +11,6 @@ using Microsoft.UI.Windowing;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Media.Imaging;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.Graphics.Imaging;
|
||||
|
||||
// To learn more about WinUI, the WinUI project structure,
|
||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Grid x:Name="RootGrid" SizeChanged="RootGrid_SizeChanged">
|
||||
|
||||
<Grid
|
||||
x:Name="PlaceholderGrid"
|
||||
Width="1"
|
||||
|
||||
@@ -17,12 +17,9 @@ using Microsoft.UI.Windowing;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Input;
|
||||
using Microsoft.UI.Xaml.Media.Imaging;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.Foundation;
|
||||
using Windows.Graphics.Imaging;
|
||||
using Windows.UI;
|
||||
using WinRT.Interop;
|
||||
using WinUIEx.Messaging;
|
||||
|
||||
namespace BetterLyrics.WinUI3.Views
|
||||
{
|
||||
@@ -66,8 +63,6 @@ namespace BetterLyrics.WinUI3.Views
|
||||
AppWindow.Changed += AppWindow_Changed;
|
||||
AppWindow.Closing += AppWindow_Closing;
|
||||
|
||||
SystemBackdrop = SystemBackdropHelper.CreateSystemBackdrop(BackdropType.Transparent);
|
||||
|
||||
WeakReferenceMessenger.Default.RegisterAll(this);
|
||||
|
||||
UpdateAlbumArtThemeColors();
|
||||
@@ -207,20 +202,24 @@ namespace BetterLyrics.WinUI3.Views
|
||||
|
||||
private void OnIsFullscreenChanged()
|
||||
{
|
||||
this.SetIsFullscreen(LyricsWindowStatus.IsFullscreen);
|
||||
EnterFullscreenFontIcon.Opacity = LyricsWindowStatus.IsFullscreen ? 0 : 1;
|
||||
ExitFullscreenFontIcon.Opacity = LyricsWindowStatus.IsFullscreen ? 1 : 0;
|
||||
MaximizeButton.Visibility = LyricsWindowStatus.IsFullscreen ? Visibility.Collapsed : Visibility.Visible;
|
||||
AOTButton.Visibility = LyricsWindowStatus.IsFullscreen ? Visibility.Collapsed : Visibility.Visible;
|
||||
MinimizeButton.Visibility = LyricsWindowStatus.IsFullscreen ? Visibility.Collapsed : Visibility.Visible;
|
||||
LockButton.Visibility = LyricsWindowStatus.IsFullscreen ? Visibility.Collapsed : Visibility.Visible;
|
||||
if (this.SetIsFullscreen(LyricsWindowStatus.IsFullscreen))
|
||||
{
|
||||
EnterFullscreenFontIcon.Opacity = LyricsWindowStatus.IsFullscreen ? 0 : 1;
|
||||
ExitFullscreenFontIcon.Opacity = LyricsWindowStatus.IsFullscreen ? 1 : 0;
|
||||
MaximizeButton.Visibility = LyricsWindowStatus.IsFullscreen ? Visibility.Collapsed : Visibility.Visible;
|
||||
AOTButton.Visibility = LyricsWindowStatus.IsFullscreen ? Visibility.Collapsed : Visibility.Visible;
|
||||
MinimizeButton.Visibility = LyricsWindowStatus.IsFullscreen ? Visibility.Collapsed : Visibility.Visible;
|
||||
LockButton.Visibility = LyricsWindowStatus.IsFullscreen ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnIsMaximizedChanged()
|
||||
{
|
||||
this.SetIsMaximized(LyricsWindowStatus.IsMaximized);
|
||||
EnterMaximizeFontIcon.Opacity = LyricsWindowStatus.IsMaximized ? 0 : 1;
|
||||
ExitMaximizeFontIcon.Opacity = LyricsWindowStatus.IsMaximized ? 1 : 0;
|
||||
if (this.SetIsMaximized(LyricsWindowStatus.IsMaximized))
|
||||
{
|
||||
EnterMaximizeFontIcon.Opacity = LyricsWindowStatus.IsMaximized ? 0 : 1;
|
||||
ExitMaximizeFontIcon.Opacity = LyricsWindowStatus.IsMaximized ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnAutoShowOrHideWindowChanged()
|
||||
|
||||
@@ -20,13 +20,18 @@ BetterLyrics
|
||||
|
||||
<div align=center>
|
||||
|
||||
   
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
</div>
|
||||
|
||||
<div align=center>
|
||||
|
||||
[](https://github.com/jayfunc/BetterLyrics/stargazers)
|
||||
[](https://deepwiki.com/jayfunc/BetterLyrics)
|
||||
[](https://zread.ai/jayfunc/BetterLyrics)
|
||||
|
||||
</div>
|
||||
|
||||
@@ -147,6 +152,8 @@ BetterLyrics
|
||||
|
||||
</details>
|
||||
|
||||
本项目的持续发展离不开大家的支持。**[查看完整鸣谢名单](SPONSORS.md)**
|
||||
|
||||
## 📄 许可证
|
||||
|
||||
本项目采用 GNU 通用公共许可证 v3.0 授权。详情请参阅 [LICENSE](https://github.com/jayfunc/BetterLyrics/blob/dev/LICENSE) 文件。
|
||||
|
||||
@@ -20,13 +20,18 @@ BetterLyrics
|
||||
|
||||
<div align=center>
|
||||
|
||||
   
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
</div>
|
||||
|
||||
<div align=center>
|
||||
|
||||
[](https://github.com/jayfunc/BetterLyrics/stargazers)
|
||||
[](https://deepwiki.com/jayfunc/BetterLyrics)
|
||||
[](https://zread.ai/jayfunc/BetterLyrics)
|
||||
|
||||
</div>
|
||||
|
||||
@@ -153,6 +158,8 @@ You can donate via:
|
||||
|
||||
</details>
|
||||
|
||||
This project is made possible by the generous support of our users. **[View the full Hall of Fame](SPONSORS.md)**
|
||||
|
||||
## 📄 License
|
||||
|
||||
This project is licensed under the GNU General Public License v3.0. See the [LICENSE](https://github.com/jayfunc/BetterLyrics/blob/dev/LICENSE) file for details.
|
||||
|
||||
22
SPONSORS.md
Normal file
22
SPONSORS.md
Normal file
@@ -0,0 +1,22 @@
|
||||
Special thanks to the following people for their support!
|
||||
|
||||
特别感谢以下朋友的支持!
|
||||
|
||||
| Date / 日期 | Name / 昵称 |
|
||||
| :--- | :--- |
|
||||
| Dec 13, 2025 | \<Anonymous\> |
|
||||
| Dec 3, 2025 | YE |
|
||||
| Dec 2, 2025 | \<Anonymous\> |
|
||||
| Nov 23, 2025 | \*\*玄 |
|
||||
| Nov 21, 2025 | \*\*智 |
|
||||
| Nov 17, 2025 | \*鹤 |
|
||||
| Nov 2, 2025 | 借过 |
|
||||
| Aug 28, 2025 | \*\*华 |
|
||||
|
||||
> *List is updated manually. If you donated but don't see your name here, please contact me.*
|
||||
>
|
||||
> *名单手动更新。如果您已捐赠但未在此看到您的名字,请联系我。*
|
||||
|
||||
I would also like to express my sincere gratitude to **all users who purchased the app from the Store**. Your support is the driving force behind this project!
|
||||
|
||||
同时,向 **所有在商店购买应用的用户** 表达最诚挚的感谢。你们的支持是本项目不断前行的动力!
|
||||
Reference in New Issue
Block a user