Feature/image preview zoom - #104
Merged
Merged
Conversation
$matches 是 PowerShell 内置自动变量(存储正则匹配结果), 赋值会导致不可预期副作用。改为 $matchedLines。
## 修复了哪些问题 1. **编辑器光标不闪烁**: - TabContent 新增 caret_visible 字段,控制光标可见状态 - 点击编辑器区域时启动 CARET_TIMER_ID 定时器(530ms 周期) - on_timer_caret 中新增编辑器光标闪烁逻辑,与 AI 面板/沙盒输入框统一处理 - render_editor 中根据 caret_visible 决定是否绘制光标,实现闪烁效果 2. **文件树单击手感**: - 确认文件树已是单击打开(非双击),handle_file_tree_click 中 FileKind::File 直接打开 - 拖拽检测阈值保持 4px,避免误触发 ## 极致性能设计 - 光标闪烁使用脏矩形标记,只重绘 EditorContent 区域(非全窗口) - 定时器只在需要时启动(点击编辑器/输入框时),无输入时自动停止 - 与现有脏矩形追踪系统整合,不引入额外渲染开销
- 添加 Ctrl+滚轮缩放图片(10%-1000%) - 添加 Ctrl+= / Ctrl+- 快捷键缩放 - 添加 Ctrl+0 重置缩放 - 信息栏显示当前缩放比例 - 添加图片渲染裁剪,防止溢出编辑区域 - 添加鼠标中键拖拽平移功能 - 切换图片/标签时自动重置缩放状态
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.
变更内容
更新了哪些特性
修复了哪些问题
其他说明
本次更新为图片预览功能添加了完整的缩放和平移能力,用户可以:
切换图片或标签时会自动重置缩放状态,确保每次打开图片都从 100% 开始。