Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion TeXmacs/progs/generic/insert-menu.scm
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@
(if (detailed-menus?)
(if (style-has? "std-fold-dtd")
(-> "Fold" (link insert-fold-menu)))
(-> "Animation" (link insert-animation-menu)))
(if (with-developer-tool?)
(-> "Animation" (link insert-animation-menu))))
(if (and (style-has? "session-dtd") (detailed-menus?) (not (in-math?)))
(-> "Session" (link insert-session-menu))))

Expand Down
6 changes: 3 additions & 3 deletions TeXmacs/progs/texmacs/menus/view-menu.scm
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,6 @@
(if (with-developer-tool?)
("Left side tools" (toggle-visible-side-tools 1))
("Right side tools" (toggle-visible-side-tools 0))
("GUI through markup" (toggle-markup-gui)))
---
("Animation toolbar" (toggle-bottom-bar "animate")))
("GUI through markup" (toggle-markup-gui))
---
("Animation toolbar" (toggle-bottom-bar "animate"))))
70 changes: 70 additions & 0 deletions devel/222_83.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# [222_83] 动画工具栏仅在开发工具模式下启用

## 相关文档
- [x_y.md](x_y.md) - 开发文档模板

## 任务相关的代码文件
- `TeXmacs/progs/texmacs/menus/view-menu.scm`
- `TeXmacs/progs/generic/insert-menu.scm`
- `TeXmacs/progs/texmacs/menus/tools-menu.scm`
- `TeXmacs/progs/kernel/texmacs/tm-modes.scm`

## 如何测试
1. 启动 Mogan
2. 点击 `查看` 菜单,确认没有 `动画工具栏` 选项
3. 点击 `插入` 菜单,确认没有 `动画` 子菜单
4. 点击 `工具 -> 开发工具`,勾选启用开发工具
5. 再次点击 `查看` 菜单,确认出现 `动画工具栏` 选项
6. 再次点击 `插入` 菜单,确认出现 `动画` 子菜单
7. 点击 `动画工具栏`,确认底部动画工具栏正常显示和工作

## 如何提交
```bash
# 提交前执行的最少测试步骤
xmake build mogan
./build/mogan
```

## 2026/05/08 将动画相关菜单放入开发工具条件分支

### What
将 `查看` 菜单中的 `动画工具栏` 选项和 `插入` 菜单中的 `动画` 子菜单移到 `(if (with-developer-tool?) ...)` 条件内,使其仅在开发工具开启时可见。

### Why
动画相关功能目前还不成熟,不应向普通用户暴露该入口。开发工具模式面向开发者,允许访问实验性功能。

### How
在 `view-menu.scm` 中,将原来的:
```scheme
(if (with-developer-tool?)
("Left side tools" (toggle-visible-side-tools 1))
("Right side tools" (toggle-visible-side-tools 0))
("GUI through markup" (toggle-markup-gui)))
---
("Animation toolbar" (toggle-bottom-bar "animate"))
```
改为:
```scheme
(if (with-developer-tool?)
("Left side tools" (toggle-visible-side-tools 1))
("Right side tools" (toggle-visible-side-tools 0))
("GUI through markup" (toggle-markup-gui))
---
("Animation toolbar" (toggle-bottom-bar "animate")))
```

在 `insert-menu.scm` 中,将原来的:
```scheme
(if (detailed-menus?)
(if (style-has? "std-fold-dtd")
(-> "Fold" (link insert-fold-menu)))
(-> "Animation" (link insert-animation-menu)))
```
改为:
```scheme
(if (detailed-menus?)
(if (style-has? "std-fold-dtd")
(-> "Fold" (link insert-fold-menu)))
(if (with-developer-tool?)
(-> "Animation" (link insert-animation-menu))))
```