mirror of
https://github.com/jayfunc/BetterLyrics.git
synced 2026-01-12 10:54:55 +08:00
fix: fullscreen maximize button error
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<Identity
|
||||
Name="37412.BetterLyrics"
|
||||
Publisher="CN=E1428B0E-DC1D-4EA4-ACB1-4556569D5BA9"
|
||||
Version="1.1.171.0" />
|
||||
Version="1.1.172.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="ca4a4830-fc19-40d9-b823-53e2bff3d816" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
|
||||
@@ -73,8 +73,6 @@ namespace BetterLyrics.WinUI3.Extensions
|
||||
var status = new LyricsWindowStatus(window)
|
||||
{
|
||||
Name = _resourceService.GetLocalizedString("FullscreenMode"),
|
||||
IsAlwaysOnTop = true,
|
||||
TitleBarArea = TitleBarArea.None,
|
||||
LyricsLayoutOrientation = LyricsLayoutOrientation.Vertical,
|
||||
LyricsStyleSettings = new LyricsStyleSettings
|
||||
{
|
||||
|
||||
@@ -283,6 +283,8 @@ namespace BetterLyrics.WinUI3.Hooks
|
||||
|
||||
public static void SetIsFullscreen(this Window window, bool enable)
|
||||
{
|
||||
if (window.AppWindow == null) return;
|
||||
|
||||
if (enable)
|
||||
{
|
||||
window.AppWindow.SetPresenter(AppWindowPresenterKind.FullScreen);
|
||||
@@ -295,6 +297,8 @@ namespace BetterLyrics.WinUI3.Hooks
|
||||
|
||||
public static void SetIsMaximized(this Window window, bool enable)
|
||||
{
|
||||
if (window.AppWindow == null) return;
|
||||
|
||||
if (enable)
|
||||
{
|
||||
window.Maximize();
|
||||
@@ -312,6 +316,8 @@ namespace BetterLyrics.WinUI3.Hooks
|
||||
|
||||
public static void SetIsAlwaysOnTop(this Window window, bool enable)
|
||||
{
|
||||
if (window.AppWindow == null) return;
|
||||
|
||||
if (window.AppWindow.Presenter is OverlappedPresenter presenter)
|
||||
{
|
||||
presenter.IsAlwaysOnTop = enable;
|
||||
|
||||
@@ -176,6 +176,9 @@ namespace BetterLyrics.WinUI3.Views
|
||||
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;
|
||||
}
|
||||
|
||||
private void OnIsMaximizedChanged()
|
||||
|
||||
Reference in New Issue
Block a user