From 0884c561e1e7c759d414b3a6643cce5f5f06157d Mon Sep 17 00:00:00 2001 From: Richasy Date: Wed, 18 Sep 2024 13:31:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E5=85=A5=E6=96=B0=E7=AA=97=E5=8F=A3?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E6=97=B6=E9=81=B5=E5=BE=AA=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E6=A8=A1=E5=BC=8F=20(#593)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Desktop/BiliCopilot.UI/Forms/MainWindow.xaml.cs | 2 -- .../Core/PlayerViewModelBase/PlayerViewModelBase.cs | 6 +----- src/Libs/Danmaku.Core/DanmakuFrostMaster.cs | 4 ++++ 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Desktop/BiliCopilot.UI/Forms/MainWindow.xaml.cs b/src/Desktop/BiliCopilot.UI/Forms/MainWindow.xaml.cs index 29f35ec2..93d157cc 100644 --- a/src/Desktop/BiliCopilot.UI/Forms/MainWindow.xaml.cs +++ b/src/Desktop/BiliCopilot.UI/Forms/MainWindow.xaml.cs @@ -284,8 +284,6 @@ private static LRESULT HookKeyboardCallback(int nCode, WPARAM wParam, LPARAM lPa } } - Debug.WriteLine("Keyboard Hook: " + nCode); - return PInvoke.CallNextHookEx(HHOOK.Null, nCode, wParam, lParam); } } diff --git a/src/Desktop/BiliCopilot.UI/ViewModels/Core/PlayerViewModelBase/PlayerViewModelBase.cs b/src/Desktop/BiliCopilot.UI/ViewModels/Core/PlayerViewModelBase/PlayerViewModelBase.cs index f3976af7..2a3ce51e 100644 --- a/src/Desktop/BiliCopilot.UI/ViewModels/Core/PlayerViewModelBase/PlayerViewModelBase.cs +++ b/src/Desktop/BiliCopilot.UI/ViewModels/Core/PlayerViewModelBase/PlayerViewModelBase.cs @@ -77,11 +77,7 @@ public virtual async Task SetPlayDataAsync(string? videoUrl, string? audioUrl, b _smtc.ButtonPressed += OnSystemControlsButtonPressedAsync; // 独立窗口播放时默认全窗口播放. 外置播放器播放时除外. - if (IsSeparatorWindowPlayer && !IsFullWindow && !IsExternalPlayer) - { - ToggleFullWindowCommand.Execute(default); - } - else if (!IsExternalPlayer) + if (!IsExternalPlayer) { var defaultDisplay = SettingsToolkit.ReadLocalSetting(SettingNames.DefaultPlayerDisplayMode, PlayerDisplayMode.Default); if (!IsFullScreen && defaultDisplay == PlayerDisplayMode.FullScreen) diff --git a/src/Libs/Danmaku.Core/DanmakuFrostMaster.cs b/src/Libs/Danmaku.Core/DanmakuFrostMaster.cs index d0871b1f..ce72de31 100644 --- a/src/Libs/Danmaku.Core/DanmakuFrostMaster.cs +++ b/src/Libs/Danmaku.Core/DanmakuFrostMaster.cs @@ -1,7 +1,9 @@ // using Microsoft.Graphics.Canvas.Text; using Microsoft.Graphics.Canvas.UI.Xaml; +using Microsoft.UI; using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Media; using System; using System.Collections.Generic; using System.Linq; @@ -43,6 +45,8 @@ public DanmakuFrostMaster(Grid rootGrid, LoggingChannel loggingChannel = null, A { rootGrid.Children.Clear(); var canvas = new CanvasAnimatedControl(); + canvas.ClearColor = Colors.Transparent; + canvas.Background = new SolidColorBrush(Colors.Transparent); rootGrid.Children.Add(canvas); Logger.SetLogger(loggingChannel);