Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 384851

Summary: top right control destroys border for last CTabItem in 4.2
Product: [Eclipse Project] Platform Reporter: Andrei Diaconu <andi_dm1>
Component: SWTAssignee: Paul Pazderski <paul-eclipse>
Status: VERIFIED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: abhishek.kishore, lshanmug, niraj.modi, paul-eclipse, sravankumarl
Version: 4.2Keywords: triaged
Target Milestone: 4.16 M1   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/158188
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=d9b79f45e8f47a07ed6851cf7869a579a10d3f90
Whiteboard:
Attachments:
Description Flags
screenshot of snippet with code from 3.8
none
screenshot of snippet with code from swt-win32-4427 none

Description Andrei Diaconu CLA 2012-07-11 13:19:09 EDT
Run the following snippet in 3.7 and in 4.2:

	public static void main(String[] args) {
		final Display display = new Display();
		final Shell shell = new Shell(display);
		shell.setLayout(new FillLayout());

		final CTabFolder tabFolder = new CTabFolder(shell, SWT.CLOSE);

		final CTabItem item = new CTabItem(tabFolder, SWT.NONE);
		item.setText("Item");

		final Label label = new Label(tabFolder, SWT.NONE);
		label.setText("label");
		tabFolder.setTopRight(label, SWT.FILL);

		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
		display.dispose();
	}


In 3.7, the last item is painted properly, with border. In 4.2 the right border is missing, and looks very ugly. In fact, it doesn't look like a tab item anymore, so I cannot upgrade to 4.2.
Comment 1 Abhishek Kishore CLA 2014-07-22 00:54:05 EDT
I don't see the issue with 4.4. Can you please try with the latest Eclipse and see if the problem's still there?
Comment 2 Andrei Diaconu CLA 2014-07-22 11:34:46 EDT
Created attachment 245274 [details]
screenshot of snippet with code from 3.8
Comment 3 Andrei Diaconu CLA 2014-07-22 11:35:40 EDT
Created attachment 245275 [details]
screenshot of snippet with code from swt-win32-4427
Comment 4 Andrei Diaconu CLA 2014-07-22 11:38:07 EDT
I updated to 4.4 and the problem persists. I added as attachments screenshots of the snippet with 3.8 version and 4.4 version.
Comment 5 Abhishek Kishore CLA 2014-07-30 02:32:55 EDT
(In reply to Andrei Diaconu from comment #4)
> I updated to 4.4 and the problem persists. I added as attachments
> screenshots of the snippet with 3.8 version and 4.4 version.

Yes, I see the problem now. Thanks for the screenshots.
Comment 6 Eclipse Genie CLA 2020-01-04 07:58:45 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 7 Andrei Diaconu CLA 2020-01-17 10:19:55 EST
This is still a problem for me. It is a blocker to fully migrate to 4.2. To solve the problem I combined 4.2 SWT with CTabFolder and CTabItem from 3.8, but this is not a good solution.
Comment 8 Eclipse Genie CLA 2020-02-23 17:08:13 EST
New Gerrit change created: https://git.eclipse.org/r/158188
Comment 10 Paul Pazderski CLA 2020-04-02 13:23:47 EDT
Finally merged. Control shouldn't break boarder anymore in this configuration.
Comment 11 Sravan Kumar Lakkimsetti CLA 2020-04-08 03:37:18 EDT
Verified on Ubuntu 18.04 with 
Eclipse SDK
Version: 2020-06 (4.16)
Build id: I20200407-1800
OS: Linux, v.4.15.0-96-generic, x86_64 / gtk 3.22.30
Java version: 13.0.1
Comment 12 Niraj Modi CLA 2020-04-08 06:29:13 EDT
Verified using Build id: I20200407-1800 on Win10.
Comment 13 Lakshmi P Shanmugam CLA 2020-04-08 06:36:50 EDT
Verified on Mac with I20200407-0120.