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

@@ -348,6 +348,11 @@ describe('nativeImage module', () => {
expect(image.isEmpty()).to.be.false();
});
ifit(process.platform === 'darwin')('returns a valid named symbol on darwin', function () {
const image = nativeImage.createFromNamedImage('atom');
expect(image.isEmpty()).to.be.false();
});
ifit(process.platform === 'darwin')('returns allows an HSL shift for a valid image on darwin', function () {
const image = nativeImage.createFromNamedImage('NSActionTemplate', [0.5, 0.2, 0.8]);
expect(image.isEmpty()).to.be.false();