CodeEditApp / CodeEditApp/CodeEdit
🐞 Incorrect focus ring shape for buttons.
- Ngôn ngữ chính
- Swift
- Star
- 23k
- Fork
- 1.2k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
### 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Issue không nêu tệp nguồn, test hoặc điểm bắt đầu của button. Hãy bắt đầu bằng cách xác định phần triển khai button SwiftUI chịu trách nhiệm cho focus ring được báo cáo và tái hiện nó bằng thao tác điều hướng bằng bàn phím trên macOS. Hoàn thành khi focus ring đi theo hình dạng của hình ảnh button thay vì hình chữ nhật hiện tại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- macos, swift
- Lĩnh vực
- accessibility, desktop
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100