Community
Participate
Working Groups
Created attachment 284751 [details] eclipse_4.17-disabled_icons_not_gray We have an RCP application. In 4.16, on RHEL 7, disabled icons are properly rendered in gray. We updated to 4.17, and disabled icons are not properly rendered in gray. Beside changing the Eclipse version, Java, the O/S, etc. are all the same. This lack of gray rendering is not seen on Windows 10 nor MacOS. It is limited to RHEL 7. This lack of proper rendering is an impediment for UX. Please let me know what additional information would be helpful in understanding the issue. Some O/S information: $ cat /etc/redhat-release Red Hat Enterprise Linux Workstation release 7.8 (Maipo) $ rpm -q gtk3 gtk3-3.22.30-5.el7.x86_64 Some Eclipse info: java.specification.vendor=Oracle Corporation java.specification.version=11 java.vendor=AdoptOpenJDK java.vendor.url=https://adoptopenjdk.net/ java.vendor.url.bug=https://github.com/AdoptOpenJDK/openjdk-support/issues java.vendor.version=AdoptOpenJDK java.version=11.0.8 java.version.date=2020-07-14 org.eclipse.swt.internal.deviceZoom=100 org.eclipse.swt.internal.gdk.backend=x11 org.eclipse.swt.internal.gtk.theme=Adwaita org.eclipse.swt.internal.gtk.version=3.22.30
Created attachment 284752 [details] eclipse_4.16-disabled_icons_gray Attachment showing 4.16 on RHEL 7 rendering disabled icons as expected
Hello, I'm having a hard time reproducing this. I have downloaded the latest 4.17 Eclipse and the icons in the toolbar seems to be grayed as usual. If you could provide a reproduction snippet that would be great. If not, could you please tell me how you are setting the icons to be disabled? I'm guessing just a call to ToolItem.setEnabled(false)
It would be good to have a standalone example project demonstrating the problem. Could you also please try 4.18 latest I-Build?
Created attachment 284777 [details] Test Project I've attached a test project based on the Eclipse RCP app template. In plugin.xml I added a Command, a ToolBar item and a Handler class which returns false for isEnabled(). When launched on Windows and Mac the toolbar item is disabled, but on Linux it is disabled.
(In reply to Phil Beauvoir from comment #4) > Created attachment 284777 [details] > Test Project > > I've attached a test project based on the Eclipse RCP app template. > > In plugin.xml I added a Command, a ToolBar item and a Handler class which > returns false for isEnabled(). > > When launched on Windows and Mac the toolbar item is disabled, but on Linux > it is disabled. I mean: When launched on Windows and Mac the toolbar item is correctly disabled, but on Linux it is enabled.
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/172381
According to Paul, regression is from bug 564097, patch https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/165440/.
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/172381 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=5b6474909194a96accf81dc255ae51cd4c018c34
Verified. Eclipse SDK Version: 2020-12 (4.18) Build id: I20201118-1800 OS: Linux, v.5.8.18-300.fc33.x86_64, x86_64 / gtk 3.24.23 Java version: 11.0.9
The fix here doesn't work if image is set after the disable call. E.g.: public class ToolBarExamples { Display display = new Display(); Shell shell = new Shell(display); ToolBar toolBar; public ToolBarExamples() { toolBar = new ToolBar(shell, SWT.FLAT | SWT.WRAP | SWT.RIGHT); ToolItem item1 = new ToolItem(toolBar, SWT.PUSH); item1.setText("enabled"); Image icon1 = new Image(shell.getDisplay(), "/home/sandreev/tmp/testicon.png"); item1.setImage(icon1); ToolItem item2 = new ToolItem(toolBar, SWT.PUSH); item2.setText("enabled"); Image icon2 = new Image(shell.getDisplay(), "/home/sandreev/tmp/testicon.png"); item2.setEnabled(false); item2.setImage(icon2); toolBar.pack(); shell.addListener(SWT.Resize, new Listener() { public void handleEvent(Event event) { Rectangle clientArea = shell.getClientArea(); toolBar.setSize(toolBar.computeSize(clientArea.width, SWT.DEFAULT)); } }); shell.setSize(500, 100); shell.open(); //textUser.forceFocus(); // Set up the event loop. while (!shell.isDisposed()) { if (!display.readAndDispatch()) { // If no more entries in event queue display.sleep(); } } display.dispose(); } public static void main(String[] args) { new ToolBarExamples(); } } So I guess from Eclipse POV the fix probably works. From SWT POV it doesn't.
(In reply to Simeon Andreev from comment #10) > The fix here doesn't work if image is set after the disable call. Please create new bug for this issue.