From 30180d381643054f0f74edf2080a4b57da9ec49a Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 21 Aug 2026 09:59:39 +0800 Subject: [PATCH] fix(node): prevent software actions from being clipped --- CHANGELOG.md | 2 +- tests/test_windows_node_source.py | 5 +++++ windows-node/Zcbot.WindowsNode/ConfigurationForm.cs | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0500afd..c6f60f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ - 修复国际旗舰模型输出思考过程时偶尔无法及时停止的问题;即使模型暂时没有返回新的流式片段,点击“停止”也会迅速中断当前回答。 -- Windows Node 主窗口重新整理为更宽、更清晰的桌面控制台:节点状态、能力概览和维护操作分层展示,专业软件改为独立配置行和通栏地址框,Origin、ANSYS、Blender 均可手工选择位置;Origin 自动检测也会在 COM 路径无效时继续查找注册表和标准安装目录。 +- Windows Node 主窗口重新整理为更宽、更清晰的桌面控制台:节点状态、能力概览和维护操作分层展示,专业软件改为独立配置行和通栏地址框,Origin、ANSYS、Blender 均可手工选择位置;软件卡的操作按钮在高 DPI 下也会完整显示,Origin 自动检测也会在 COM 路径无效时继续查找注册表和标准安装目录。 - Windows Node 现在可在“专业软件”区域自动检测或手工指定应用位置,并分别安装、更新 Origin、ANSYS、Blender 的独立运行环境;只装有部分专业软件的节点不再需要处理无关软件。 diff --git a/tests/test_windows_node_source.py b/tests/test_windows_node_source.py index 8cde8e5..062af4b 100644 --- a/tests/test_windows_node_source.py +++ b/tests/test_windows_node_source.py @@ -162,6 +162,11 @@ class WindowsNodeSourceTests(unittest.TestCase): self.assertIn('CreateButton("安装 / 更新环境", 150', form) self.assertIn("panel.SetColumnSpan(path, 2)", form) self.assertIn("path.ReadOnly = true", form) + software_panel = form.split("private Control CreateSoftwarePanel", 1)[1].split( + "private void RefreshSoftwareCards", 1 + )[0] + self.assertIn("actions.AutoSizeMode = AutoSizeMode.GrowAndShrink", software_panel) + self.assertIn("actions.WrapContents = false", software_panel) self.assertIn("SoftwareRuntimeManager.InstallRuntimeAsync", form) self.assertIn("item.HasActiveJobs", form) for runtime_id in ('"origin"', '"ansys"', '"blender"'): diff --git a/windows-node/Zcbot.WindowsNode/ConfigurationForm.cs b/windows-node/Zcbot.WindowsNode/ConfigurationForm.cs index 5ceca93..8838497 100644 --- a/windows-node/Zcbot.WindowsNode/ConfigurationForm.cs +++ b/windows-node/Zcbot.WindowsNode/ConfigurationForm.cs @@ -365,6 +365,8 @@ internal sealed class ConfigurationForm : Form var actions = CreateActions(); actions.Anchor = AnchorStyles.Right; actions.Dock = DockStyle.None; + actions.AutoSizeMode = AutoSizeMode.GrowAndShrink; + actions.WrapContents = false; actions.Margin = new Padding(18, 0, 0, 0); var automatic = CreateButton("自动检测", 92); Button? choose = null;