Skip to content

Conversation

@AXeonV
Copy link
Contributor

@AXeonV AXeonV commented Feb 9, 2026

[201_80] 定制化表格handles显示

如何测试

  1. 插入任意样式的表格(大表格、小表格除外),handles应该正确显示,且支持拖拽
  2. 插入align环境,或者在数学模式下输入矩阵,handles应该不显示,且不支持拖拽
  3. 手动修改样式TS文件(样式->编辑样式),插入 <assign|table-handles|false> 后保存
  4. 再次插入任意表格,handles应该始终不显示,且不支持拖拽

2026/2/9

What

在align环境等数学环境下的所有表格结构的组件,在编辑时,handles都应该不显示,也不应支持拖拽

How

  1. vars.hppvars.cppenv_default.cpp 中添加 TABLE_HANDLES 环境变量,默认值为 "true",表示表格handles默认显示
  2. edit_repaint.cpp 中的 repaint_table_handles 函数中添加判断,如果当前表格所在环境的 MODE 环境变量值为 "math",则不显示handles;如果 TABLE_HANDLES 环境变量值为 "false",则始终不显示handles

Copilot AI review requested due to automatic review settings February 9, 2026 15:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

该 PR 为“表格 resize handles”增加了可配置开关,并在数学环境(如 align、矩阵等)中禁用表格 handles 的显示与交互,以满足定制化样式与数学排版场景下的编辑行为要求。

Changes:

  • 新增环境变量 TABLE_HANDLES(默认 true)用于控制是否显示/启用表格 handles
  • draw_table_resize_handles 中:当 TABLE_HANDLES=false 时不绘制 handles;当表格处于 MODE=math 时不绘制 handles
  • 增加开发说明文档(含测试步骤与实现说明)

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Typeset/Env/env_default.cpp 为默认环境增加 TABLE_HANDLES=true
src/Edit/Interface/edit_repaint.cpp 根据 TABLE_HANDLESMODE=math 控制表格 handles 绘制逻辑
moebius/moebius/vars.hpp 声明新增环境变量 TABLE_HANDLES
moebius/moebius/vars.cpp 定义新增环境变量名 "table-handles"
moebius/moebius/drd/drd_std.cpp 在标准 DRD 中注册 TABLE_HANDLES 变量类型
devel/201_79.md 增加需求/测试/实现记录文档

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AXeonV AXeonV changed the title [201_70] 定制化表格handles显示 [201_79] 定制化表格handles显示 Feb 10, 2026
@AXeonV AXeonV changed the title [201_79] 定制化表格handles显示 [201_80] 定制化表格handles显示 Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant