From 9b3a59f089756677b28cd06fc0e6062bce77fcbd Mon Sep 17 00:00:00 2001 From: PrefacedCorg <1876568293@qq.com> Date: Sat, 21 Mar 2026 16:28:27 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=94=B9=E6=BC=8F=E4=BA=86=E5=86=8D?= =?UTF-8?q?=E6=94=B9=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Windows/HistoryRollbackWindow.xaml.cs | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/Ink Canvas/Windows/HistoryRollbackWindow.xaml.cs b/Ink Canvas/Windows/HistoryRollbackWindow.xaml.cs index 67755648..a3289ec3 100644 --- a/Ink Canvas/Windows/HistoryRollbackWindow.xaml.cs +++ b/Ink Canvas/Windows/HistoryRollbackWindow.xaml.cs @@ -41,16 +41,16 @@ namespace Ink_Canvas // 应用当前主题 ApplyCurrentTheme(); - // 折叠浮动工具栏 - CollapseFloatingBar(); + // 隐藏主窗口 + HideMainWindow(); LoadVersions(); } /// - /// 折叠主窗口的浮动工具栏 + /// 隐藏主窗口 /// - private async void CollapseFloatingBar() + private void HideMainWindow() { try { @@ -58,13 +58,13 @@ namespace Ink_Canvas var mainWindow = Application.Current.MainWindow as MainWindow; if (mainWindow != null) { - // 调用折叠方法 - await mainWindow.FoldFloatingBar(null); + // 隐藏主窗口 + mainWindow.Visibility = Visibility.Hidden; } } catch (Exception ex) { - LogHelper.WriteLogToFile($"折叠浮动工具栏时出错: {ex.Message}", LogHelper.LogType.Error); + LogHelper.WriteLogToFile($"隐藏主窗口时出错: {ex.Message}", LogHelper.LogType.Error); } } @@ -346,6 +346,22 @@ namespace Ink_Canvas protected override void OnClosing(CancelEventArgs e) { downloadCts?.Cancel(); + + try + { + // 获取主窗口实例 + var mainWindow = Application.Current.MainWindow as MainWindow; + if (mainWindow != null) + { + // 重新显示主窗口 + mainWindow.Visibility = Visibility.Visible; + } + } + catch (Exception ex) + { + LogHelper.WriteLogToFile($"显示主窗口时出错: {ex.Message}", LogHelper.LogType.Error); + } + base.OnClosing(e); } From 03c1399768f8a1458531f2614b5ca5b39b6572b5 Mon Sep 17 00:00:00 2001 From: PrefacedCorg <1876568293@qq.com> Date: Sat, 21 Mar 2026 16:29:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=9C=8B=E5=BE=97=E4=B8=8D=E5=A4=9F?= =?UTF-8?q?=E9=95=BF=20=E8=B0=83=E9=95=BF=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/MainWindow.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml index ec836c63..fad91b88 100644 --- a/Ink Canvas/MainWindow.xaml +++ b/Ink Canvas/MainWindow.xaml @@ -24,7 +24,7 @@ Closing="Window_Closing" Closed="Window_Closed" PreviewKeyDown="Main_Grid_PreviewKeyDown" - Height="9000" Width="1440" + Height="16000" Width="1440" FontFamily="Microsoft YaHei UI" MouseWheel="Window_MouseWheel" Foreground="{DynamicResource FloatBarForeground}"