CodeEditApp / CodeEditApp/CodeEdit
🐞 Incorrect focus ring shape for buttons.
- 主要语言
- Swift
- 星标
- 23k
- 派生
- 1.2k
- PR 合并指标
- 30 天内没有已合并 PR
描述
### Description
Focus ring shape for buttons are incorrect.
For AppKit controls, focus rings for buttons with images automatically get their shape according to the image content, or it could be arbitrarily drawn by implementing `NSCell.drawFocusRingMask(withFrame:in:)`.
For SwiftUI, current I have no idea how to implement such behavior. `View.contentShape(_:eoFill:)` may help, but unless we have a efficient way to convert SF Symbols to `CGPath`s. The [only article I could find](https://maheepk.net/posts/converting-sf-symbols-to-shapes/) utilizes `Vision.framework` to do this, which is too heavy I believe.
### To Reproduce
1. Enable keyboard navigation on system settings.
2. Open CodeEdit and see the focus ring shape.
### Expected Behavior
Focus rings should be the same shape as the button image.
### Version Information
CodeEdit: Version 0.0.3-dev (30)
macOS: 13.3 Beta (22E5236f)
Xcode: 14.2.1
### Additional Context
_No response_
### Screenshots
贡献指南
调研方向
该 issue 没有指出源文件、测试或按钮入口点。首先定位负责所报告焦点环的 SwiftUI 按钮实现,并在 macOS 上通过键盘导航复现该问题。完成标准是焦点环跟随按钮图像的形状,而不是当前的矩形形状。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- macos, swift
- 领域
- accessibility, desktop
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100