From 58b0a0a3be6207abd55f9b100c5dcd14ef9a19f3 Mon Sep 17 00:00:00 2001 From: CJK_mkp <113243675+CJKmkp@users.noreply.github.com> Date: Sat, 8 Nov 2025 19:15:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=B4=9F=E6=95=B0=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84=E8=AE=A1=E6=97=B6=E5=99=A8=E5=B4=A9=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/FullscreenTimerWindow.xaml.cs | 5 ++--- Ink Canvas/Windows/MinimizedTimerWindow.xaml.cs | 5 ++--- Ink Canvas/Windows/NewStyleTimerWindow.cs | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Ink Canvas/Windows/FullscreenTimerWindow.xaml.cs b/Ink Canvas/Windows/FullscreenTimerWindow.xaml.cs index 7221e64e..cee0ce8a 100644 --- a/Ink Canvas/Windows/FullscreenTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/FullscreenTimerWindow.xaml.cs @@ -125,9 +125,8 @@ namespace Ink_Canvas seconds = timeSpan.Seconds; } - // 更新小时显示 - SetDigitDisplay("FullHour1Display", hours / 10, shouldShowRed); - SetDigitDisplay("FullHour2Display", hours % 10, shouldShowRed); + SetDigitDisplay("FullHour1Display", Math.Abs(hours / 10) % 10, shouldShowRed); + SetDigitDisplay("FullHour2Display", (hours % 10 + 10) % 10, shouldShowRed); // 更新分钟显示 SetDigitDisplay("FullMinute1Display", minutes / 10, shouldShowRed); diff --git a/Ink Canvas/Windows/MinimizedTimerWindow.xaml.cs b/Ink Canvas/Windows/MinimizedTimerWindow.xaml.cs index 50731801..10b8a3aa 100644 --- a/Ink Canvas/Windows/MinimizedTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/MinimizedTimerWindow.xaml.cs @@ -169,9 +169,8 @@ namespace Ink_Canvas seconds = timeSpan.Seconds; } - // 更新小时显示 - SetDigitDisplay("MinHour1Display", hours / 10, shouldShowRed); - SetDigitDisplay("MinHour2Display", hours % 10, shouldShowRed); + SetDigitDisplay("MinHour1Display", Math.Abs(hours / 10) % 10, shouldShowRed); + SetDigitDisplay("MinHour2Display", (hours % 10 + 10) % 10, shouldShowRed); // 更新分钟显示 SetDigitDisplay("MinMinute1Display", minutes / 10, shouldShowRed); diff --git a/Ink Canvas/Windows/NewStyleTimerWindow.cs b/Ink Canvas/Windows/NewStyleTimerWindow.cs index 7c6dcbb0..a46dae48 100644 --- a/Ink Canvas/Windows/NewStyleTimerWindow.cs +++ b/Ink Canvas/Windows/NewStyleTimerWindow.cs @@ -130,8 +130,8 @@ namespace Ink_Canvas bool shouldShowRed = MainWindow.Settings.RandSettings?.EnableOvertimeRedText == true; - SetDigitDisplay("Digit1Display", displayHours / 10, shouldShowRed); - SetDigitDisplay("Digit2Display", displayHours % 10, shouldShowRed); + SetDigitDisplay("Digit1Display", Math.Abs(displayHours / 10) % 10, shouldShowRed); + SetDigitDisplay("Digit2Display", (displayHours % 10 + 10) % 10, shouldShowRed); SetDigitDisplay("Digit3Display", overtimeSpan.Minutes / 10, shouldShowRed); SetDigitDisplay("Digit4Display", overtimeSpan.Minutes % 10, shouldShowRed); SetDigitDisplay("Digit5Display", overtimeSpan.Seconds / 10, shouldShowRed);