Skip to content

Conversation

@HannesWell
Copy link
Member

  • Support SVG icons as custom Extension-Element icons
  • Support SVG images as About-dialog image of products
  • Support SVG images as Windows image of products

and use the SVG-format in extension-point schema examples.

FileExtensionsFilter filter = new FileExtensionsFilter();
filter.addFileExtension("gif"); //$NON-NLS-1$
filter.addFileExtension("png"); //$NON-NLS-1$
filter.addFileExtension("svg"); //$NON-NLS-1$
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if SVG can be generally allowed for images that are associated with the application window? This might be renderer natively by the OS.

"attribute", "value"}; //$NON-NLS-1$ //$NON-NLS-2$

private static final String[] VALID_IMAGE_TYPES = {"png", "bmp", "ico", "gif", "jpg", "tiff"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
private static final Set<String> VALID_IMAGE_TYPES = Set.of("svg", "png", "bmp", "ico", "gif", "jpg", "tiff"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually every image format that SWT supports could be listed here.
Maybe we should consider to introduce some kind of ImageFileDialog as extension of FileDialog that allows to load and save images of the formats that SWT supports and returns the path or even the Image/ImageData directly as convenience.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AWT allows to enumerate supported images (with Java SPI + ImageReader interface) in what case e.g. JFace could offer such smarter FileChooser Dialogs...

@github-actions
Copy link

github-actions bot commented May 7, 2025

Test Results

   285 files     285 suites   51m 53s ⏱️
 3 611 tests  3 535 ✅  76 💤 0 ❌
11 025 runs  10 794 ✅ 231 💤 0 ❌

Results for commit 8eaabb3.

♻️ This comment has been updated with latest results.

- Support SVG icons as custom Extension-Element icons
- Support SVG images as About-dialog image of products
- Support SVG images as Windows image of products

and use the SVG-format in extension-point schema examples.
@HannesWell HannesWell force-pushed the support-svg-in-editors branch from b5154e1 to 8eaabb3 Compare May 21, 2025 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants