script_icon_from_file

Short description

This is a small example to show how an icon can be set to a script, whereas the icon itself resides in the add-on as a resource.

Note

This example is meant as addition to the information given in how-to: Adding workspaces to packages - Icon guidelines.

Highlights

Normally, the icon can be set using the “Script properties” dialog accessible by right-click in the Script Editor of the GOM Software.

However, using VS Code or another text editor, the corresponding .metainfo files of the scripts can be edited directly. If you have icon files within your add-on, you can directly enter the relative path to the icon in the "icon" property.

If you use this approach, and follow our icon guidelines, the icons get inverted in dark themes automatically.