mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user