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
Detect the desired size from the path or Query parameters.
Currently we have the problem that I want to replace some icons with a
SVG variant. Currently Icons can be organized in folders like
/icons/16x16, /icons/32x32 and so on for high resolution support.
Currently if one want to replace such structure with SVG it is required
to scale down the SVG to 16x16 pixel document size as otherwise they get
rendered at there native size (what usually is much larger).
As it is not really desirable to restrict the size of the SVG design for
technical reasons, JFace now can detect two cases:
1) the SVG is places in a folder with "classic" folder layout the size
is extracted and passed down as a hint for dynamic sizable icons
2) one can additionally add a query parameter, e.g. if I have an icon
like /icons/obj16/search.svg and I have two places where I want to use
it one for a toolbar (16x16) and once for a Wizard Images (usually
128x128) I can use the url
bundle:/example.id/icons/obj16/search.svg?size=16x16 and
bundle:/example.id/icons/obj16/search.svg?size=128x128 to accomplish
this task without the need to even store two SVGs
0 commit comments