CodeEditApp / CodeEditApp/CodeEdit

🐞 Incorrect focus ring shape for buttons.

オープン
#1,144 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
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.
Screenshot 2023-03-12 at 15 59 12
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

Screenshot 2023-03-12 at 16 01 20

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。