~~Title: DPI aware Icon Sets ~~
Directory Opus handles different system DPI settings transparently, and will scale icons as needed. However, you may want to provide multiple base icon images in your icon sets to handle different DPI settings. Scaling often results in blurry and unsatisfactory images - providing the same icons in multiple resolutions can result in a better aesthetic result when the user is running on a high-DPI system.
For each `` entry in the XML file you can provide an optional `` key which specifies alternate images for different DPI settings, and can also optionally set limits on when the image can be used. For example, if an image doesn’t look good scaled up you can set a maximum scale factor it can be used for.
The `` key has the following attributes:
|``||
|``|specifies the base scale factor of the image (e.g. "100")|
|``min="x"`|minimum scale factor this should be used for (optional, e.g. "200")\\ |
|`max="x"`|maximum scale factor this should be used for (optional, e.g. "400")|
|`no_scale_min="x"`|minimum scale factor this image should be used without any scaling (optional)\\ |
|`no_scale_max="x"`|maximum of above (optional). Use -1 for infinite.\\ |
|`filename="x"`|filename of the alternate image|
|`width="x"`|width of icons in the alternate image (optional, will be calculated if not provided)\\ |
|`height="x" />`|height of icons in the alternate image (optional, will be calculated if not provided)\\ |
|``||
|``||
As many `` entries can be provided as needed. If the `` key is missing altogether a base scaling factor of 100% is assumed. If needed, you can include the base image in the DPI list as well (for example, if you want to specify `no_scale_min` and `no_scale_max` values for it).
The `no_scale_xxx` range can be used to snap to various sizes while avoiding blurring. This is usually only needed at small sizes (since once icons get larger, the scaling works better). Ranges are inclusive of their `min` and `max` values, should not overlap with each other, and the value specified for `factor` should fall within the range.
A real example from the default icon set:
...
...