You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The icon contribution point allow extensions to define a new icon by id, along with a default icon.
That icon id can then be used by the extension (or any other extensions that depend on the extension) at the places where ThemeIcon can be used.
Product icon themes can redefine the icon (if they know about the icon id)
Create an extension that contributes an icon and use it.
In this example, an extension defines two new icon ids distro-ubuntu and distro-fedora along with default icon definitions. The icons are defined in an icon font at the given font character. The icon font is defined in a new contribution point iconFonts.
The product-icon-theme-sample can be used as the icon font. It also contains a script build create an icon font from svgs.
test that the code completion, hovers and validation work when authoring an icon and icon font contribution
test that the icon identifier must consist of at least two segments separated by minus (needs a new I-Build)
test that that the icon ids (e.g. distro-ubuntu and distro-fedora) can be used in markdown strings ("$(distro-ubuntu)" Ubuntu 20.04") and at all places that take a ThemeIcon ( new ThemeIcon("distro-ubuntu"))
test that the icon id can also be used by other extensions (if they know about the icon id)
test that a product icon themes can redefine the icon (you can test this with the product-icon-theme-sample )
The text was updated successfully, but these errors were encountered:
Refs: #114942
Complexity: 4
Create Issue
The icon contribution point allow extensions to define a new icon by id, along with a default icon.
That icon id can then be used by the extension (or any other extensions that depend on the extension) at the places where
ThemeIcon
can be used.Create an extension that contributes an icon and use it.
In this example, an extension defines two new icon ids
distro-ubuntu
anddistro-fedora
along with default icon definitions. The icons are defined in an icon font at the given font character. The icon font is defined in a new contribution pointiconFonts
.The product-icon-theme-sample can be used as the icon font. It also contains a script build create an icon font from svgs.
distro-ubuntu
anddistro-fedora
) can be used in markdown strings ("$(distro-ubuntu)" Ubuntu 20.04"
) and at all places that take a ThemeIcon (new ThemeIcon("distro-ubuntu")
)The text was updated successfully, but these errors were encountered: