SWT 4.25 ToolBar ToolItem icon image wrong transparent color [message #1854944] |
Mon, 19 September 2022 19:45  |
Eclipse User |
|
|
|
I found that SWT version 4.25 has a bug but bug report is disabled,
ToolBar toolbar = new ToolBar(p, SWT.NONE);
ToolItem toolitem = new ToolItem(toolbar, SWT.NONE);
toolitem.setImage(image);
Created toolitem image has transparent color. But transparent color is now white as shown in the attached image. This must match background color gray.
This does not happen in 4.24. Icon images in other types of widgets are OK. Only with ToolItem images.
|
|
|
Re: SWT 4.25 ToolBar ToolItem icon image wrong transparent color [message #1855041 is a reply to message #1854944] |
Sun, 25 September 2022 15:23   |
Eclipse User |
|
|
|
It works fine for me under SWT 4.25
Here is Hello, Tool Bar! working on Linux, Mac, and Windows with cut/copy/paste images having transparency show the grey color of the window beneath:
https://imgur.com/a/JwSA0Pr
Linux:

Mac:

Windows:

The GUI code in Glimmer DSL for SWT (equivalent to the Java code you shared):
tool_bar {
tool_item {
image File.expand_path('./images/cut.png', __dir__), height: 16
}
tool_item {
image File.expand_path('./images/copy.png', __dir__), height: 16
}
tool_item {
image File.expand_path('./images/paste.png', __dir__), height: 16
}
tool_item(:separator)
combo {
selection <=> [self, :font_size]
}
}
Full code: https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_tool_bar.rb
What operating system are you encountering the problem on?
Could it be you are using an image without proper transparency?
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05021 seconds