Detect the desired size from the path or Query parameters. #3431
+57
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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/search.png,/icons/32x32/search.pngand 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:
/icons/obj16/search.svgand 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 urlbundle:/example.id/icons/obj16/search.svg?size=16x16andbundle:/example.id/icons/obj16/search.svg?size=128x128to accomplish this task without the need to even store two SVGs