Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] How to provide HDPI icons in your plug-in

Hi all,

I'd like to add that in order to better "factorize" this effort, reducing effort and improving quality, it's also a good practice to reuse the PlatformUI or whatever upstream projects images rather than duplicating them.
For example, if you're dealing with some error/warnings, instead of copying images in your plugin, consume directly PlatformUI.getWorkbench().getSharedImages(ISharedImages.IMG_DEC_FIELD_ERROR).
The benefits are multiple:
* smaller plugin jar size
* less RAM consumed as images are not duplicated
* consistency: if Platform UI or upstream adopts a new convention, downstream projects inherit from it for free
* inheritance of @2x icons: If upstream has HiDPI icons, they're be used by your project

Cheers,

On 09/21/2016 10:58 AM, Lars Vogel wrote:
the buildship project contact me about how to provide HDPI icons for
there project. As I assume many projects have this question, I post
here the related info.

The general support in Platform is explained here:
https://www.eclipse.org/eclipse/news/4.6/platform_isv.php#high-dpi-icons

Platform has also a Maven based command line tool to renderer png in
different sizes from svg images. See
http://www.vogella.com/tutorials/Eclipse4Notes/article.html#providing_hdpi_icons
for some info for that.


--
Mickael Istria
Eclipse developer for Red Hat Developers
My blog - My Tweets

Back to the top