Closed
Description
I'm seeing this artifact in an RCP application that uses org.eclipse.e4.ui.workbench.renderers.swt_0.15.200.v20210816-1658
, running on Windows 10 and 11, but the relevant code snippet seems to be present on master as well. I didn't encounter it in any version of the IDE however.
A small example that reproduces the issue:
Shell shell = new Shell(SWT.DIALOG_TRIM | SWT.PRIMARY_MODAL);
shell.setText("CTabRendering example");
shell.setLayout(new GridLayout(1, false));
CTabFolder folder = new CTabFolder(shell, SWT.NONE);
folder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
CTabRendering renderer = new CTabRendering(folder);
renderer.setShadowVisible(false);
renderer.setCornerRadius(0); // change to a value greater than 6 to enable rounded tabs
folder.setRenderer(renderer);
CTabItem tab1 = new CTabItem(folder, SWT.NONE);
tab1.setText("Folder tab 1");
shell.setSize(600, 500);
shell.open();
final Display display = shell.getDisplay();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) { display.sleep(); }
}
The rendered result with square tabs:
With rounded tabs:
When the tab is rendered in inactive mode, the polyline skips visiting the upper right part and heads straight to the lower right corner: