PNG icons in ToolBars [message #464288] |
Sun, 20 November 2005 18:24 |
Eclipse User |
|
|
|
Originally posted by: ng.felicis.org
Hello together,
using PNG icons with transparency for the ToolBar looks pretty well on GTK,
but does not look well on Windows. I found the main bug entry in the
bugzilla system, but I couldn't clearly figure out if the problem has been
completely resolved yet. I made screenshots of my environments:
Linux with GTK 2: http://www.felicis.org/screenshot_toolbar_gtk.png
Windows XP: http://www.felicis.org/screenshot_toolbar_windows.png
One of the PNG files: http://www.felicis.org/zoomXPlus-22.png
Currently I load an image like that:
toolItem = new ToolItem(this.toolBar, SWT.PUSH);
ImageData imageData = new ImageData(filename);
Image image = new Image(SWTGeoGUI.iDisplay, imageData);
toolItem.setImage(image);
Is there a way I can have the ToolBar icons look as smooth on Windows as on
GTK without converting the PNGs to GIFs?
Martin
|
|
|
|
|
Re: PNG icons in ToolBars [message #464407 is a reply to message #464383] |
Wed, 23 November 2005 06:43 |
Eclipse User |
|
|
|
Originally posted by: ng.felicis.org
Veronika Irvine wrote:
> Support for PNG on Windows for all widgets was added in 3.1 RC3. If you
> are using this release or a later release and are still seeing a problem,
> please report a bug against Platform SWT.
I am using 3.1. Did you already try to use the provided PNG above in a
ToolBar? What are your results on Windows?
Martin
|
|
|
|
|
|
Re: PNG icons in ToolBars [message #464524 is a reply to message #464522] |
Wed, 23 November 2005 18:38 |
Eclipse User |
|
|
|
Originally posted by: ng.felicis.org
Hi Veronika,
Veronika Irvine wrote:
> Used your PNG on Windows.
>
> With a manifest on Windows XP it looks great. Without the manifest I see
> what you are seeing.
thanks for that hint. You are right, it works with the manifest as it
should. Unfortunately you were a little too late for my bug report:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=117764 ;-)
I thought the issue with the manifest has been already resolved by SWT 3.1,
but I guess that was some misunderstanding.
Nevertheless there are two problems still remaining. What happens on older
Windows systems (I don't have any here at the moment ...)? Further more, it
is unfortunate to "install" another file into a program's directory that
only the Administrator should be allowed to have write access to.
Is there any chance this problem may be solved in coming releases? Is the
only workaround to use PNGs without alpha channels or GIFs instead?
Martin
|
|
|
|
|
|
|
Re: PNG icons in ToolBars [message #464576 is a reply to message #464560] |
Fri, 25 November 2005 10:07 |
Eclipse User |
|
|
|
Originally posted by: ng.felicis.org
Daniel Spiewak wrote:
> It would seem that I was wrong. It's possible that my information was
> reguarding one of the milestones of 3.1 and I had simply forgotten
> about it.
> Right at the moment, I don't have a chance to test it on GTK. Anyone
> else have a box they can run this on?
It looks the same on Linux with GTK. So I suppose there is full PNG support
for labels as well on GTK.
BTW: Your code causes some errors here. Instead of
label.setImage(new Image(display,
TestClass.class.getResourceAsStream("/image.png")));
I had to use
|
|
|
Re: PNG icons in ToolBars [message #464578 is a reply to message #464576] |
Fri, 25 November 2005 10:08 |
Eclipse User |
|
|
|
Originally posted by: ng.felicis.org
(uups)
I had to use
ImageData imageData = new ImageData("zoomXPlus-22.png");
Image image = new Image(display, imageData);
Label label = new Label(shell, SWT.CENTER);
label.setImage(image);
to make it work.
|
|
|
|
|
|
|
Re: PNG icons in ToolBars [message #464833 is a reply to message #464717] |
Wed, 30 November 2005 15:03 |
Eclipse User |
|
|
|
Originally posted by: karstendd.gmx.de
> Also, related question, I copied the manifest file
> javaw.exe.manifest, but
> Eclipse still doesn't use the Luna look. How come?
> My own SWT apps do
> hough.
>
You should check how many different "javaw.exe-files" are installed on your system. If you are using Windows it could be possible that Eclipse uses "javaw.exe" from the WINDOWS_HOME\system32-Directory. In this case you have to copy your manifest-file into the sytem32-Directory.
|
|
|
Powered by
FUDForum. Page generated in 0.06141 seconds