Closed jukzi closed 11 months ago
@SudhindraKKulkarni as you have already analysed the problem, can you provide a fix, please?
Reproducible with this snippet on my Win11:
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setLayout (new GridLayout (1, true));
Label label = new Label(shell, 0);
label.setText(
"1. Run on Windows\n" +
"2. Press Alt\n" +
"3. Issue 848: Buttons disappear"
);
TabFolder tabFolder = new TabFolder(shell, 0);
Composite composite = new Composite(tabFolder, 0);
composite.setLayout(new GridLayout (1, true));
TabItem tabItem = new TabItem(tabFolder, 0);
tabItem.setControl(composite);
tabItem.setText("TabPage");
Button button1 = new Button(composite, SWT.PUSH);
button1.setText("&Button1");
Button button2 = new Button(composite, SWT.PUSH);
button2.setText("B&utton2");
button2.setEnabled(false);
shell.pack();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
I plan to investigate and fix this within a week.
The fix is available at https://github.com/eclipse-platform/eclipse.platform.swt/pull/911
I think that there's no need to rush this fix into upcoming 4.30 release:
TabFolder
)
This problem occurs when we are in the "light"theme, in "dark" theme it works fine. The problem is there since eclipse version 2022-03. So till 2021-12 it was working fine. The changes responsible for the problem is the because the api "wmColorChild" was overrriden in the "Button" class in order to fix the bugzilla bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=577042
Originally posted by @SudhindraKKulkarni in https://github.com/eclipse-pde/eclipse.pde/issues/727#issuecomment-1790272732