Cmd-Shift-E now opens and puts away the Content panel, like a drawer.
中文版在文末,点开即可阅读。
Before
After
Before: the panel stayed. After: it is put away and the viewport gets the room.
Situation
Turing Sim's Content panel, the example and asset browser, opens with Cmd-Shift-E. Once open, the same shortcut did nothing, so it took several clicks to get the viewport's room back. The bottom panels' top edge could only be dragged down: with no central widget, Qt had no room above to grow into. Two shortcuts had also leaked out of their panels: Ctrl-Return in the chat input sent a message from anywhere, and Return or Cmd-F in Content acted from fields in other panels.
Task
Make Content behave like a drawer, let the bottom edge move both ways, and keep each panel's shortcuts inside that panel.
Action
- Cmd-Shift-E toggles. With the Content panel in view, the shortcut puts it away; pressed again, it reopens at the height it was put away at.
- The bottom edge drags both ways. Dragging it resizes the panels on both sides, and a taller window gives its height to the viewport row instead of the bottom panels.
- A short Content dock stays usable. Its panes scroll and its footer hides below a minimum height.
-
Shortcuts stay local. PySide6 silently ignores
QShortcut(context=...)when a slot is passed, which had left them window-wide. They now set their context explicitly.
The commit was tested in isolation: 80 passed and 6 native docking tests skipped offscreen.
Result
The captures press the shortcut with Content open. The old version keeps the panel; the new one puts it away. The demo opens and closes it twice. A native check for the shortcuts was added (verify_panel_key_focus.py) but was not run in this session.
⌘⇧E 现在可以像抽屉一样打开和收起 Content 面板。 Turing Sim 的 Content 面板(示例和资产浏览器)用 ⌘⇧E 打开。打开之后再按同一个快捷键没有任何反应,要点好几下才能把视口的空间要回来。底部面板的上边缘只能往下拖:窗口没有中央控件,Qt 在上方没有可以扩展的空间。还有两个快捷键越出了自己的面板:聊天输入框的 Ctrl-Return 在任何地方都会发送消息,Content 里的 Return 和 ⌘F 会在其他面板的输入框里触发。 让 Content 像抽屉一样开关,让底部边缘可以上下拖,并让每个面板的快捷键只在自己面板里生效。 这个 commit 单独测试:80 项通过,6 项原生停靠测试在离屏模式下跳过。 截图里都是在 Content 打开时按下快捷键。旧版本面板还在;新版本面板被收起了。动图里开关了两次。这个 commit 还加了一个原生窗口里的快捷键检查脚本(中文版 · Chinese version(点击展开)
背景
目标与难点
解决思路与行动
QShortcut(context=...),导致这些快捷键变成全窗口生效。现在改为显式设置 context。
结果与下一步
verify_panel_key_focus.py),本次会话没有运行它。



Top comments (0)