Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for SVG Images for Actions, Commands and Menu's for HighDPI and zooming support #129

Open
phermsdorf opened this issue Jun 19, 2023 · 0 comments

Comments

@phermsdorf
Copy link
Contributor

Hi,

while it's possible to embed SVG images by using custom markup e.g. for a Label (documentation is here) there seems no way to embed SVG images for all kinds of elements defined in the plugin.xml. e.g.:

  • Actions
  • Commands and Command Images
  • (Menus - which contain commands and other contributions)

Actions e.g. are configured with an ImageDescriptor which get's later on transformed into an SWT image and in RAP are referenced e.e. in as div like

<div style="position: absolute; opacity: 0.3; background: url(&quot;rwt-resources/generated/a4264674.png&quot;) no-repeat; left: 4px; width: 16px; top: 4px; height: 16px;"></div>
This has the problem that it's not working properly on HighDPI displays or when the users uses the browser's zoom function.

What could be a way to use SVG images for this workbench elements?

We thought of a kind of mapping mechanism, which ask a central code part for a replacement of a defined image path+filename which could return a path+filename to a svg instead.

Or a central place in the platform, somehow similar to the org.eclipse.jface.resource.FileImageDescriptor.getxName mechanism. Where there is the problem that everthing is based on pixels ...

But there may be better ways to solve that

We have found similar demands here:

Thanks for any hints on this.

Bye Peter

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

No branches or pull requests

1 participant