feat: add SF Symbol support to NativeImage::CreateFromNamedImage (#48203)

* feat: add SF Symbol support to NativeImage::CreateFromNamedImage

* use obj-c name in NSImage constructor

* add test for named symbol image

* apply suggested simplification

* fix: support NX cocoa prefix
This commit is contained in:
axolotl
2025-11-04 21:15:34 +11:00
committed by GitHub
parent d7727c9ec2
commit 5bd45a6a28
3 changed files with 17 additions and 4 deletions

View File

@@ -202,8 +202,7 @@ Creates a new `NativeImage` instance from `dataUrl`, a base 64 encoded [Data URL
Returns `NativeImage`
Creates a new `NativeImage` instance from the `NSImage` that maps to the
given image name. See Apple's [`NSImageName`](https://developer.apple.com/documentation/appkit/nsimagename#2901388)
documentation for a list of possible values.
given image name. See Apple's [`NSImageName`](https://developer.apple.com/documentation/appkit/nsimagename#2901388) documentation and [SF Symbols](https://developer.apple.com/sf-symbols/) for a list of possible values.
The `hslShift` is applied to the image with the following rules: