From 66ae0b0270534debb2221faa329e1b75631180ad Mon Sep 17 00:00:00 2001 From: lincube Date: Thu, 9 Apr 2026 00:53:28 +0800 Subject: [PATCH] =?UTF-8?q?fix.=E8=AF=BE=E8=A1=A8=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=97=A5=E9=97=B4=E6=A8=A1=E5=BC=8F=E5=AD=97=E4=BD=93=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/ClassScheduleWidget.axaml.cs | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/LanMountainDesktop/Views/Components/ClassScheduleWidget.axaml.cs b/LanMountainDesktop/Views/Components/ClassScheduleWidget.axaml.cs index 714042a..fe79931 100644 --- a/LanMountainDesktop/Views/Components/ClassScheduleWidget.axaml.cs +++ b/LanMountainDesktop/Views/Components/ClassScheduleWidget.axaml.cs @@ -725,6 +725,8 @@ public partial class ClassScheduleWidget : UserControl, IDesktopComponentWidget, ? CreateBrush("#FF4FC3F7") : CreateBrush("#FF4D5A"); var normalBulletBrush = CreateBrush(_isNightVisual ? "#B8BEC9" : "#9AA3B2"); + var primaryBrush = CreateBrush(_isNightVisual ? "#F9FBFF" : "#151821"); + var secondaryBrush = CreateBrush(_isNightVisual ? "#848B99" : "#667084"); for (var i = 0; i < _courseItems.Count && i < CourseListPanel.Children.Count; i++) { @@ -746,19 +748,31 @@ public partial class ClassScheduleWidget : UserControl, IDesktopComponentWidget, var timeText = textStack.Children[1] as TextBlock; var detailText = textStack.Children[2] as TextBlock; - if (titleText != null && titleText.Text != item.Name) + if (titleText != null) { - titleText.Text = item.Name; + if (titleText.Text != item.Name) + { + titleText.Text = item.Name; + } + titleText.Foreground = primaryBrush; } - if (timeText != null && timeText.Text != item.TimeRange) + if (timeText != null) { - timeText.Text = item.TimeRange; + if (timeText.Text != item.TimeRange) + { + timeText.Text = item.TimeRange; + } + timeText.Foreground = secondaryBrush; } - if (detailText != null && detailText.Text != item.Detail) + if (detailText != null) { - detailText.Text = item.Detail; + if (detailText.Text != item.Detail) + { + detailText.Text = item.Detail; + } + detailText.Foreground = secondaryBrush; } } }