From 89097085888793fb1647de2c365acde46aadf85a Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Mon, 8 Sep 2025 16:38:57 +0800 Subject: [PATCH] fix: fix render geoetry issue and color picker scroll issue --- HFUTCourseSimulation/Kernel/Render.cs | 6 +++--- HFUTCourseSimulation/Widget/ColorPicker.xaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/HFUTCourseSimulation/Kernel/Render.cs b/HFUTCourseSimulation/Kernel/Render.cs index 86e828b..2a17aa6 100644 --- a/HFUTCourseSimulation/Kernel/Render.cs +++ b/HFUTCourseSimulation/Kernel/Render.cs @@ -58,8 +58,8 @@ namespace HFUTCourseSimulation.Kernel { _weekWidthWithMargin = _weekWidth + 2 * MARGIN; _weekHeightWithMargin = _weekHeight + 2 * MARGIN; - _width = _weekWidth * _horizontalCount; - _height = _weekHeight * _verticalCount; + _width = _weekWidthWithMargin * _horizontalCount; + _height = _weekHeightWithMargin * _verticalCount; } int _horizontalCount, _verticalCount; @@ -111,7 +111,7 @@ namespace HFUTCourseSimulation.Kernel { public Rectangle GetHeadbarBoxRect(int week) { var pos = GetTablePos(week); - return new Rectangle(pos, new Size(7 * CELL_WIDTH, HEADBAR_HEIGHT)); + return new Rectangle(pos, new Size(SIDEBAR_WIDTH + 7 * CELL_WIDTH, HEADBAR_HEIGHT)); } public Rectangle GetSidebarTextRect(int week, int index) { diff --git a/HFUTCourseSimulation/Widget/ColorPicker.xaml b/HFUTCourseSimulation/Widget/ColorPicker.xaml index 6b100e7..3821e16 100644 --- a/HFUTCourseSimulation/Widget/ColorPicker.xaml +++ b/HFUTCourseSimulation/Widget/ColorPicker.xaml @@ -41,9 +41,9 @@ - - - + + +