Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 501803

Summary: [Graphics] Use png files for compare editor instead of gif files
Product: [Eclipse Project] Platform Reporter: Lars Vogel <Lars.Vogel>
Component: TeamAssignee: Matthias Becker <ma.becker>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, eclipse.sprigogin, Lars.Vogel, loskutov, ma.becker
Version: 4.4   
Target Milestone: 4.7 M3   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/81960
https://git.eclipse.org/r/81961
https://git.eclipse.org/c/platform/eclipse.platform.team.git/commit/?id=5ee45ccc30b17601d1a332c034a6a9e3dd843718
https://git.eclipse.org/c/platform/eclipse.platform.images.git/commit/?id=e5920e578e3590509da242863547c8a6159e8cfa
Whiteboard:
Bug Depends on: 509856    
Bug Blocks: 504629    
Attachments:
Description Flags
Screenshot
none
Comparison of old ( left ) and new ( right ) icons in org.eclipse.compare
none
Comparison of old ( left ) and new ( right ) wizard banner icons in org.eclipse.compare
none
Comparison of old ( left ) and new ( right ) wizard banner icons in org.eclipse.compare
none
Comparison of old ( left ) and new ( right ) icons in org.eclipse.team.ui
none
Comparison of old ( left ) and new ( right ) wizard banner icons in org.eclipse.team.ui none

Description Lars Vogel CLA 2016-09-20 04:46:21 EDT

    
Comment 1 Lars Vogel CLA 2016-09-20 04:47:01 EDT
Created attachment 264276 [details]
Screenshot
Comment 2 Matthias Becker CLA 2016-09-23 04:26:16 EDT
I started to work on this.
The icons in org.eclipse.compare are no problem.
I also looked for other GIFs in this repo and found out that in org.eclipse.team.ui
a lot of GIFs can be found. I now created PNGs for them but there is an issue:

org.eclipse.team.ui.ISharedImages exposes the file names as the constants as API. When I now change these values other plugin (e.g. eGit) that use this constants get the "read replacement icon" instead of the actual icon. How should we fix this issue?
Keep the filenames in org.eclipse.team.ui.ISharedImages and change the registration in
TeamUIPlugin#initializeImages? Any suggestions?
Comment 3 Andrey Loskutov CLA 2016-09-23 04:27:33 EDT
Just save png files with .gif extension?
Comment 4 Lars Vogel CLA 2016-09-23 04:43:20 EDT
(In reply to Andrey Loskutov from comment #3)
> Just save png files with .gif extension?

-1

I check later the code, but sounds like we need to keep the constants. They can point to the png files. Weird, I agree but we should not break API.
Comment 5 Andrey Loskutov CLA 2016-09-23 06:57:21 EDT
(In reply to Lars Vogel from comment #4)
> (In reply to Andrey Loskutov from comment #3)
> > Just save png files with .gif extension?
> 
> -1

Why not? Technically it will work.
Comment 6 Lars Vogel CLA 2016-09-23 07:10:25 EDT
(In reply to Andrey Loskutov from comment #5)
> Why not? Technically it will work.

Because it is super confusing for any developer looking at these icons.
Comment 7 Andrey Loskutov CLA 2016-09-23 07:13:35 EDT
(In reply to Lars Vogel from comment #6)
> (In reply to Andrey Loskutov from comment #5)
> > Why not? Technically it will work.
> 
> Because it is super confusing for any developer looking at these icons.

But who cares which extension the icon files have? I usually don't :-)
Comment 8 Lars Vogel CLA 2016-09-23 07:14:40 EDT
(In reply to Andrey Loskutov from comment #7)
> But who cares which extension the icon files have? I usually don't :-)

I do, since I'm helping with the gif-> png work since a few years.
Comment 9 Matthias Becker CLA 2016-09-23 07:19:12 EDT
(In reply to Lars Vogel from comment #8)
> (In reply to Andrey Loskutov from comment #7)
> > But who cares which extension the icon files have? I usually don't :-)
> 
> I do, since I'm helping with the gif-> png work since a few years.

+1 Also the PNG renderer that created the PNGs out of the SVG creates them as they are automatically. We would have to rename them manually after the generation. It's very likely that the next generation changes this again. 
I also expect a lot of troubles with other tools that care about the extension.
I will try Lars' proposal.
Comment 10 Eclipse Genie CLA 2016-09-27 02:30:42 EDT
New Gerrit change created: https://git.eclipse.org/r/81960
Comment 11 Matthias Becker CLA 2016-09-27 02:40:22 EDT
Created attachment 264432 [details]
Comparison of old ( left ) and new ( right ) icons in org.eclipse.compare
Comment 12 Matthias Becker CLA 2016-09-27 02:40:52 EDT
Created attachment 264433 [details]
Comparison of old ( left ) and new ( right ) wizard banner icons in org.eclipse.compare
Comment 13 Matthias Becker CLA 2016-09-27 02:41:24 EDT
Created attachment 264434 [details]
Comparison of old ( left ) and new ( right ) wizard banner icons in org.eclipse.compare
Comment 14 Matthias Becker CLA 2016-09-27 02:42:00 EDT
Created attachment 264435 [details]
Comparison of old ( left ) and new ( right ) icons in org.eclipse.team.ui
Comment 15 Matthias Becker CLA 2016-09-27 02:42:29 EDT
Created attachment 264436 [details]
Comparison of old ( left ) and new ( right ) wizard banner icons in org.eclipse.team.ui
Comment 16 Matthias Becker CLA 2016-09-27 02:46:03 EDT
In org.eclipse.team.ui had to change the image registration as the file-names are used as the key for the icons in the image registry. These file-names are part of the API as public constants. So my approach is to keept these contants unchanged (with ".gif") and add additional private constants for the filenames that are then used when registering the icons in the image registry.

I did a quick manual test of my changes and did not find any issues. But as a lot of icons are affecte and as I also changed quite some code, somebody really should do a detailed test.
Comment 17 Matthias Becker CLA 2016-09-27 02:46:54 EDT
A lot of icons of org.eclipse.team.ui already existed in the images repo. I only re-created the missing once.
Comment 18 Lars Vogel CLA 2016-09-27 03:23:30 EDT
warning_co and version_controlled have a white boarder. Invisible on the light theme but annoying in the dark theme. Can this be adjusted?
Comment 19 Matthias Becker CLA 2016-09-27 04:49:25 EDT
(In reply to Lars Vogel from comment #18)
> warning_co and version_controlled have a white boarder. Invisible on the
> light theme but annoying in the dark theme. Can this be adjusted?

They already existed in the old version and I think it's a good idea to have them as these icons are used as overlays. The white border helps to destinguish the overlay icon from the "main" icon.
Comment 22 Lars Vogel CLA 2016-09-27 15:19:41 EDT
Thanks Matthias for the contribution.
Comment 23 Lars Vogel CLA 2016-10-06 08:43:36 EDT
Matthias, please see Bug 504629 for a small regression.
Comment 24 Dani Megert CLA 2016-10-11 06:47:13 EDT
(In reply to Lars Vogel from comment #23)
> Matthias, please see Bug 504629 for a small regression.

It's not a small regression. CVS icons are broken.
Comment 25 Matthias Becker CLA 2016-10-11 10:11:13 EDT
(In reply to Dani Megert from comment #24)
> (In reply to Lars Vogel from comment #23)
> > Matthias, please see Bug 504629 for a small regression.
> 
> It's not a small regression. CVS icons are broken.

See my comments in https://bugs.eclipse.org/bugs/show_bug.cgi?id=504629