Conversation
快捷功能设置中缺少截图 OCR 的快捷入口,用户需要通过菜单才能触发截图 OCR。在迷你窗口标题栏与其他快捷图标一样提供一键入口会更方便。 在通用设置的快捷功能区域新增"显示截图 OCR 快捷图标"开关,并在标题栏添加 screenshotOCRButton。开启后标题栏右上角显示 camera.metering.multispot 图标,点击触发截图 OCR,关闭则隐藏。 用户现在可以在快捷功能中直接开启截图 OCR 快捷图标,从迷你窗口标题栏一键启动截图 OCR,与其他快捷图标行为一致。 ---------------------------------------------------------------------- feat(titlebar): add screenshot OCR quick link toggle The shortcut function settings had no quick entry for screenshot OCR, requiring users to navigate the menu to trigger it. A one-click entry in the mini window titlebar, consistent with other quick link icons, would be more convenient. Add a "Show Screenshot OCR quick link icon" toggle in the General settings quick link section, plus a screenshotOCRButton in the titlebar. When enabled, a camera.metering.multispot icon appears in the top-right corner that triggers screenshot OCR on click; when disabled, it is hidden. Users can now enable the screenshot OCR quick link icon from shortcut settings and launch screenshot OCR directly from the mini window titlebar, matching the behavior of other quick link icons.
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.
概述 / Summary
在快捷功能设置中新增「显示截图 OCR 快捷图标」开关。开启后,迷你窗口右上角标题栏会显示截图 OCR 图标(
camera.metering.multispot),点击即可触发截图 OCR,与其他快捷图标(Google、欧路词典、苹果词典、快捷设置)行为一致。Adds a "Show Screenshot OCR quick link icon" toggle in the shortcut function settings. When enabled, a screenshot OCR icon (
camera.metering.multispot) appears in the mini window titlebar's top-right corner, clickable to trigger screenshot OCR — consistent with existing quick link icons (Google, Eudic, Apple Dictionary, Settings).改动文件 / Changed Files
Defaults.Keys+Extension.swiftshowScreenshotOCRQuickLinkDefaults keyMyConfiguration.swift@DefaultsWrapper属性、Combine 观察者、@ShortcutWrapper用于 tooltip、setter 方法GeneralTab.swiftEZTitlebar.hscreenshotOCRButton属性声明EZTitlebar.mbuttonWithType:case、shortcutButtonTypes条件分支、tooltip 分支Localizable.xcstringsshow_screenshot_ocr_quick_link本地化 key,覆盖全部 6 种语言实现细节 / Implementation
EZTitlebarButtonType枚举 +shortcutButtonTypes+buttonWithType:+toolTipStrWithButtonType:EZWindowManager.shared.screenshotOCR,与菜单项和快捷键触发的同一方法camera.metering.multispot,与ShortcutAction.swift中.screenshotOCR的 icon 一致true,与其他快捷图标开关保持一致linkButtonUpdated通知刷新标题栏,无需重启验证 / Verification
代码编译通过(构建中遇到的
CocoaLumberjack模块缓存错误和mj_ignoredPropertyNames冲突为仓库既有问题,与本次改动无关,已通过 stash + clean build 对比确认)。