Repository navigation
[6015] 在文档编辑界面左下角添加展示与隐藏目录的页码按钮 - #4700
Merged
Merged
Conversation
1. 状态栏控件重构:将原状态栏中央(middleLabel)显示的纯文本页码移走,在状态栏左下角首位新增专用复合交互按钮 pageOutlineBtn(editor-page-outline-btn); 2. 复合外观:采用 QToolButton 与 Qt::ToolButtonTextBesideIcon,左侧配置大纲矢量图标(sidebar.svg / sidebar-white.svg),右侧紧随「页面: X / Y」文本,光标翻页时实时动态刷新; 3. 双向状态联动:目录展开显示时按钮处于选中高亮态(checked: true),收起隐藏时恢复未选中态;点击按钮触发 (toggle-outline-sidebar) 与 update_visibility();连接 pdfOutlineDock->visibilityChanged 保持双向精准同步; 4. 主题适配:在 liii.css 与 liii-night.css 中定制 hover、pressed 与 checked 样式; 5. 单元测试:在 qt_outline_widget_test.cpp 中增加 3 项针对状态栏目录按钮的单元测试(14/14 checks passed)。
…ar、合并 CSS 基础样式、移除仅测 Qt 自身的测试 Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
任务概述
关联任务文档:
devel/6015.stem前置任务:MoganLab/mogan#4698(大纲侧边栏)、MoganLab/mogan#4699(PDF 工具栏目录按钮)
对标 WPS Office / Microsoft Word 等现代办公软件在状态栏左下角集成目录大纲交互的行业标准设计:
middleLabel)显示的纯文本无前缀页码移走,在状态栏左下角首位新增专用复合交互按钮pageOutlineBtn(editor-page-outline-btn);QToolButton与Qt::ToolButtonTextBesideIcon,左侧配置大纲矢量图标(复用sidebar.svg/sidebar-white.svg),右侧紧随「页面: X / Y」文本,光标翻页时实时动态刷新;checked: true),收起隐藏时恢复未选中态(checked: false);(toggle-outline-sidebar)与update_visibility();pdfOutlineDock->visibilityChanged信号,无论通过按钮、菜单栏还是快捷键切换大纲,按钮状态均 100% 精准同步;liii.css与liii-night.css中为该按钮定制 hover、pressed 与 checked 样式,适配浅色与深色主题;tests/Plugins/Qt/qt_outline_widget_test.cpp中增加 3 项针对状态栏目录按钮的单元测试(14/14 checks passed);xmake b stem100% 成功无告警。