From c43b69b4cb9a36ec4c3cefd044874a541f7d9ffa Mon Sep 17 00:00:00 2001 From: Zhe Fang Date: Sun, 12 Oct 2025 09:40:10 -0400 Subject: [PATCH] rollback window ctrl btn to previous version --- .../Package.appxmanifest | 2 +- .../ViewModels/LyricsWindowViewModel.cs | 14 +++++ .../Views/LyricsWindow.xaml | 52 +++++++++++++++++-- .../Views/LyricsWindow.xaml.cs | 37 +++++++++++-- FAQ/FAQ.md | 19 ++++--- README.md | 2 +- 6 files changed, 106 insertions(+), 20 deletions(-) diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3 (Package)/Package.appxmanifest b/BetterLyrics.WinUI3/BetterLyrics.WinUI3 (Package)/Package.appxmanifest index 779e3f7..950d37a 100644 --- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3 (Package)/Package.appxmanifest +++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3 (Package)/Package.appxmanifest @@ -12,7 +12,7 @@ + Version="1.0.76.0" /> diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/ViewModels/LyricsWindowViewModel.cs b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/ViewModels/LyricsWindowViewModel.cs index 20fbdee..2f7605f 100644 --- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/ViewModels/LyricsWindowViewModel.cs +++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/ViewModels/LyricsWindowViewModel.cs @@ -110,6 +110,10 @@ namespace BetterLyrics.WinUI3 [ObservableProperty] public partial Visibility DesktopFlyoutItemVisibility { get; set; } = Visibility.Visible; [ObservableProperty] public partial Visibility PIPFlyoutItemVisibility { get; set; } = Visibility.Visible; [ObservableProperty] public partial Visibility DockFlyoutItemVisibility { get; set; } = Visibility.Visible; + [ObservableProperty] public partial Visibility MinimiseButtonVisibility { get; set; } = Visibility.Visible; + [ObservableProperty] public partial Visibility MaximiseButtonVisibility { get; set; } = Visibility.Visible; + [ObservableProperty] public partial Visibility RestoreButtonVisibility { get; set; } = Visibility.Visible; + [ObservableProperty] public partial Visibility CloseButtonVisibility { get; set; } = Visibility.Visible; [ObservableProperty] public partial bool IsFullScreenFlyoutItemChecked { get; set; } = false; [ObservableProperty] public partial bool IsDesktopFlyoutItemChecked { get; set; } = false; @@ -305,6 +309,8 @@ namespace BetterLyrics.WinUI3 private void SetFullscreenTitleBarControlsStatus() { LockButtonVisibility = DesktopFlyoutItemVisibility = PIPFlyoutItemVisibility = DockFlyoutItemVisibility = Visibility.Collapsed; + MinimiseButtonVisibility = MaximiseButtonVisibility = RestoreButtonVisibility = Visibility.Collapsed; + CloseButtonVisibility = Visibility.Visible; IsFullScreenFlyoutItemChecked = true; IsImmersiveMode = true; } @@ -312,6 +318,8 @@ namespace BetterLyrics.WinUI3 private void SetPIPModeTitleBarControlsStatus() { DesktopFlyoutItemVisibility = FullScreenFlyoutItemVisibility = DockFlyoutItemVisibility = LockButtonVisibility = Visibility.Collapsed; + MinimiseButtonVisibility = MaximiseButtonVisibility = RestoreButtonVisibility = Visibility.Collapsed; + CloseButtonVisibility = Visibility.Visible; IsImmersiveMode = true; IsPIPFlyoutItemChecked = true; } @@ -324,6 +332,8 @@ namespace BetterLyrics.WinUI3 overlappedPresenter.IsMinimizable = overlappedPresenter.IsMaximizable = false; DesktopFlyoutItemVisibility = LockButtonVisibility = FullScreenFlyoutItemVisibility = PIPFlyoutItemVisibility = Visibility.Collapsed; + MinimiseButtonVisibility = MaximiseButtonVisibility = RestoreButtonVisibility = Visibility.Collapsed; + CloseButtonVisibility = Visibility.Visible; IsImmersiveMode = true; IsDockFlyoutItemChecked = true; } @@ -337,6 +347,8 @@ namespace BetterLyrics.WinUI3 overlappedPresenter.IsMinimizable = overlappedPresenter.IsMaximizable = false; DockFlyoutItemVisibility = FullScreenFlyoutItemVisibility = PIPFlyoutItemVisibility = Visibility.Collapsed; LockButtonVisibility = Visibility.Visible; + MinimiseButtonVisibility = MaximiseButtonVisibility = RestoreButtonVisibility = Visibility.Collapsed; + CloseButtonVisibility = Visibility.Visible; IsDesktopFlyoutItemChecked = true; } @@ -349,6 +361,8 @@ namespace BetterLyrics.WinUI3 overlappedPresenter.IsMinimizable = overlappedPresenter.IsMaximizable = true; DesktopFlyoutItemVisibility = DockFlyoutItemVisibility = PIPFlyoutItemVisibility = FullScreenFlyoutItemVisibility = Visibility.Visible; LockButtonVisibility = Visibility.Collapsed; + MinimiseButtonVisibility = MaximiseButtonVisibility = CloseButtonVisibility = Visibility.Visible; + RestoreButtonVisibility = Visibility.Collapsed; IsFullScreenFlyoutItemChecked = IsDesktopFlyoutItemChecked = IsDockFlyoutItemChecked = IsPIPFlyoutItemChecked = false; IsImmersiveMode = _settingsService.AppSettings.GeneralSettings.IsImmersiveMode; } diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/LyricsWindow.xaml b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/LyricsWindow.xaml index 67dfbae..da22bea 100644 --- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/LyricsWindow.xaml +++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/LyricsWindow.xaml @@ -123,11 +123,6 @@ Icon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}" /> - @@ -145,6 +140,7 @@ FontSize="{x:Bind ViewModel.TitleBarFontSize}" Glyph="" /> + @@ -156,6 +152,52 @@ + + + + + + + + + + diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/LyricsWindow.xaml.cs b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/LyricsWindow.xaml.cs index 421346e..b983c62 100644 --- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/LyricsWindow.xaml.cs +++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/LyricsWindow.xaml.cs @@ -33,6 +33,7 @@ namespace BetterLyrics.WinUI3.Views AppWindow.Changed += AppWindow_Changed; ExtendsContentIntoTitleBar = true; + AppWindow.TitleBar.PreferredHeightOption = TitleBarHeightOption.Collapsed; UpdateTitleBarArea(); Title = App.ResourceLoader!.GetString("LyricsPageTitle"); @@ -134,6 +135,8 @@ namespace BetterLyrics.WinUI3.Views { _settingsService.AppSettings.StandardModeSettings.WindowBounds = new Windows.Foundation.Rect(rect.X, rect.Y, size.Width, size.Height); _settingsService.AppSettings.StandardModeSettings.IsMaximized = overlappedPresenter.State == OverlappedPresenterState.Maximized; + ViewModel.MaximiseButtonVisibility = _settingsService.AppSettings.StandardModeSettings.IsMaximized ? Visibility.Collapsed : Visibility.Visible; + ViewModel.RestoreButtonVisibility = _settingsService.AppSettings.StandardModeSettings.IsMaximized ? Visibility.Visible : Visibility.Collapsed; } break; case LyricsWindowMode.DockMode: @@ -222,14 +225,38 @@ namespace BetterLyrics.WinUI3.Views WindowHelper.OpenWindow(); } - private void ExitAppMenuFlyoutItem_Click(object sender, RoutedEventArgs e) - { - WindowHelper.ExitApp(); - } - private void TipContainerCenter_Loaded(object sender, RoutedEventArgs e) { App.Current.LyricsWindowNotificationPanel = TipContainerCenter; } + + private void MinimiseButton_Click(object sender, RoutedEventArgs e) + { + if (AppWindow.Presenter is OverlappedPresenter presenter) + { + presenter.Minimize(); + } + } + + private void MaximiseButton_Click(object sender, RoutedEventArgs e) + { + if (AppWindow.Presenter is OverlappedPresenter presenter) + { + presenter.Maximize(); + } + } + + private void RestoreButton_Click(object sender, RoutedEventArgs e) + { + if (AppWindow.Presenter is OverlappedPresenter presenter) + { + presenter.Restore(); + } + } + + private void CloseButton_Click(object sender, RoutedEventArgs e) + { + ViewModel.ExitOrClose(); + } } } diff --git a/FAQ/FAQ.md b/FAQ/FAQ.md index 4c5181d..b513688 100644 --- a/FAQ/FAQ.md +++ b/FAQ/FAQ.md @@ -1,25 +1,28 @@ -### Where I can find the logs? -`C:\Users\%USERNAME%\AppData\Local\Packages\37412.BetterLyrics_rd1g0rsrrtxw8\LocalCache\logs` +### ? Where I can find the logs? +`%LocalAppData%\Packages\37412.BetterLyrics_rd1g0rsrrtxw8\LocalCache\logs` -### How to install ".msixbundle" package? (for test package only) +### ? Where I can find the lyrics cache? +`%LocalAppData%\Packages\37412.BetterLyrics_rd1g0rsrrtxw8\LocalCache\lyrics` + +### ? How to install ".msixbundle" package? (for test package only) [See this doc](https://github.com/jayfunc/BetterLyrics/blob/dev/How2Install/How2Install.md) -### Lyrics are moving back and forth constantly, how to fix it? +### ? Lyrics are moving back and forth constantly, how to fix it? ![](Snipaste_2025-08-22_14-59-53.png) Go to Settings > Playback sources > Disable "Lyrics timeline sync" or increase "Lyrics timeline sync threshold" -### Wrong lyrics are shown, how to fix it? +### ? Wrong lyrics are shown, how to fix it? ![](Snipaste_2025-08-22_14-47-21.png) Open search panel to manually search for the correct lyrics. -### Playback control panel is not showing in dock mode, how to fix it? +### ? Playback control panel is not showing in dock mode, how to fix it? ![](Snipaste_2025-08-22_14-50-16.png) Hover over the bottom of the lyrics window and click on the white line to show the playback control panel. -### How to lock/unlock the lyrics window in desktop mode? +### ? How to lock/unlock the lyrics window in desktop mode? ![](Snipaste_2025-08-22_14-52-53.png) ![](Snipaste_2025-08-22_14-53-21.png) @@ -30,5 +33,5 @@ Alternatively, you can also use the shortcut `Ctrl+Alt+U` (default) to toggle lo You can change the shortcut in Settings > App appearance and behavior > Unlock and lock shortcut keys -### How to enable/disable immersive mode? +### ? How to enable/disable immersive mode? ![](Snipaste_2025-08-22_14-58-44.png) \ No newline at end of file diff --git a/README.md b/README.md index 493d214..42b6927 100644 --- a/README.md +++ b/README.md @@ -182,7 +182,7 @@ Watch our introduction video (uploaded on 18 Aug 2025) on Bilibili [here](https: If you are using a third-party modified Windows, you probably can not launch the app. -To solve this issue, please try to download from [Google Drive (v1.0.75.0)](https://drive.google.com/file/d/12cEnyfwM_aNjAgBoh_ru-UqjgYmSjsHY/view?usp=sharing) (may not be the latest version) and follow the instructions [here](https://github.com/jayfunc/BetterLyrics/blob/dev/How2Install/How2Install.md). +To solve this issue, please try to download from [Google Drive (v1.0.76.0)](https://drive.google.com/file/d/1dKxp8Zf1xwAtt0JER0wHZ-94f855GdH0/view?usp=drive_link) (may not be the latest version) and follow the instructions [here](https://github.com/jayfunc/BetterLyrics/blob/dev/How2Install/How2Install.md). ## Build