Skip to content

Comments

Supporting SF Symbols identifiers for script icons#273

Merged
IvanMathy merged 1 commit intoIvanMathy:mainfrom
nd-net:main
Aug 10, 2021
Merged

Supporting SF Symbols identifiers for script icons#273
IvanMathy merged 1 commit intoIvanMathy:mainfrom
nd-net:main

Conversation

@nd-net
Copy link

@nd-net nd-net commented Jul 2, 2021

Just a small change that also supports SF Symbols identifiers as script icon names:

  • For compatibility purposes, images in the Asset catalog take precedence.
  • If an appropriate image hasn't been found there, Boop tries to get the SF Symbol using NSImage(systemSymbolName:accessibilityDescription:) (only on macOS 11+).
  • If a script specifies an icon but nothing with the appropriate name can be found, then the icon is nil
  • If a script does not specify an icon, then the icon defaults to icons8-unknown, just as it does previously

I did not change the .lowercased() in the initialisation of Script since SF Symbols also uses lowercase-only identifiers.

The documentation has been updated appropriately.

Overview of the new functionality

script-with-sfsymbol-identifier
Specifiying an SF Symbol name in a script

boop-ui-with-sfsymbol
Selection

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 2, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@nd-net
Copy link
Author

nd-net commented Jul 2, 2021

The automatic build on bitrise fails because it's using Xcode 11.7; the NSImage(systemSymbolName:accessibilityDescription:) API is only available on macOS 11/Xcode 12 and above.

@IvanMathy
Copy link
Owner

Well, this is ridiculously cool. Thanks for the PR!

I updated the CI system's Xcode version so it'll build okay now 👍

@IvanMathy IvanMathy merged commit 90be3eb into IvanMathy:main Aug 10, 2021
@grzesimaj-74
Copy link

Dlaczego to jest tylko do Apple App Store? Ja chcę do Microsoft Lumia lub Surface. Nigdy mnie nikt nie namówi do przesiadki na Android lub Apple. Mam wiarygodne informacje których nie mogę publicznie udostępnić. Android i Apple działają wspólnie na nie korzyść dla firmy Microsoft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants