Skip to content

[0153] 分屏功能:共享菜单栏/工具栏的多文档同时编辑#3437

Open
da-liii wants to merge 4 commits into
mainfrom
da/153/split_screen
Open

[0153] 分屏功能:共享菜单栏/工具栏的多文档同时编辑#3437
da-liii wants to merge 4 commits into
mainfrom
da/153/split_screen

Conversation

@da-liii
Copy link
Copy Markdown
Contributor

@da-liii da-liii commented May 20, 2026

Summary

实现主窗口内左右分屏功能,共享菜单栏和工具栏。

  • 一个窗口内可同时显示两个 pane(左/右),通过 QSplitter 分隔
  • 每个 pane 可独立承载编辑器视图、PDF 阅读器或启动页
  • 菜单栏和工具栏保持在窗口级别共享,焦点切换时自动更新
  • 支持标签页进入不同 pane,左右 pane 可显示不同文档
  • 提供 Scheme 命令和「视图」菜单子菜单控制分屏
  • 新增 qt_split_screen_test 单元测试

Test plan

  • 左右分屏(C-c 3)与取消分屏(C-c 0)
  • 左编辑器 + 右编辑器(点击不同标签页进入不同 pane)
  • 左编辑器 + 右 PDF(焦点在右 pane 时打开 PDF)
  • 焦点切换时菜单栏和工具栏状态正确更新
  • 单元测试通过

🤖 Generated with Claude Code

da-liii and others added 4 commits May 20, 2026 19:38
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- 在 qt_tm_widget_rep 中引入 QSplitter 和双 pane 结构
- 支持 split_window_horizontally / unsplit_window / set_active_pane
- 每个 pane 可独立承载编辑器、PDF、启动页或聊天内容
- 焦点切换时自动更新菜单栏和工具栏状态
- 提供 Scheme 命令和「视图」菜单子菜单控制分屏
- 新增 qt_split_screen_test 单元测试

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- 取消注释 emacs 风格分屏快捷键 (C-c 3 分屏, C-c 0 取消, C-c o 切换)
- SLOT_SCROLLABLE 在分屏模式下将新编辑器 widget 放入活动 pane

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- PaneContentState 增加 editorWidget,记录每个 pane 的编辑器 widget
- SLOT_SCROLLABLE 分屏模式下仅操作活动 pane,保留另一 pane 内容
- set_active_pane 切换时从 pane 状态恢复 main_widget 并刷新菜单

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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