Adding Retina/HiDPI Icons in a Framework
Higher resolution icons can also be included in customized frameworks for rendering
them in a
Retina or HiDPI display. The icons can be referenced directly from the Document Type
customization (from the Action dialog box) or from an API (ro.sync.exml.workspace.api.node.customizer.XMLNodeRendererCustomizer
).
As with any image, the higher resolution icons are stored in the same images folder
as the
normal resolution images and they are identified by a scaling factor that is included
in the
name of the image files. For instance, icons with a Retina scaling factor of 2 will
include
@2x
in the name (for example,
myIcon@2x.png
).
Developers should not specify the path of the alternate icons
(@2x
or @3x
) in the Action
dialog box or the XMLNodeRendererCustomizer
API. When using a Retina or HiDPI
display, Oxygen XML Editor automatically searches the folder of the normal icon
for a corresponding image file with a Retina scaling factor in the name. If the higher
resolution icon file does not exist, the normal icon is scaled and used instead.