Bug 576287 - Package Explorer Toolbar background colour doesn't match background when toolbar is re-positioned
Summary: Package Explorer Toolbar background colour doesn't match background when tool...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.21   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 4.23 M1   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted, regression
Depends on:
Blocks: 575553
  Show dependency tree
 
Reported: 2021-09-27 10:43 EDT by Phil Beauvoir CLA
Modified: 2022-01-02 10:34 EST (History)
5 users (show)

See Also:


Attachments
3 screenshots combined (19.12 KB, image/png)
2021-09-27 10:43 EDT, Phil Beauvoir CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Beauvoir CLA 2021-09-27 10:43:26 EDT
Created attachment 287214 [details]
3 screenshots combined

Eclipse 4.21
Windows 10
Light Theme

1. Open Package Explorer and resize it as per image 1 in the attached screenshot
2. Note grey background of toolbar
3. Resize the Package Explorer as per image 2 in the attached screenshot
4. Note white background of toolbar
5. Resize the Package Explorer as per image 3 in the attached screenshot
6. Note white background of toolbar when it should be grey, as in stage (1)
Comment 1 Niraj Modi CLA 2021-10-29 05:47:04 EDT
Same behavior is seen on MAC.
This looks like UI issue, moving to UI for further investigation.
Comment 2 Lars Vogel CLA 2021-10-29 06:17:29 EDT
There are multiple styling issues in the toolbar styling and these are super annoying. IIRC multiple people already tried to identify the root cause (including me) but were not successfully.

Help wanted!
Comment 3 Rolf Theunissen CLA 2021-12-31 10:12:05 EST
This case is a regression from Bug 575553.

The optimization in Bug 575553 does not detect that the toolbar is unwrapped, and the background gradient should be re-applied.

The problem can be re-produced using modified Snippet339, see below

Note that the tab-color is a gradient (from the same color to the same color) in the Eclipse themes.

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

	CTabFolder folder = new CTabFolder(shell, SWT.BORDER);
	folder.setBackground(new Color[]{display.getSystemColor(SWT.COLOR_YELLOW), display.getSystemColor(SWT.COLOR_RED)}, new int[]{100}, true);

	for (int i = 0; i < 6; i++) {
		CTabItem item = new CTabItem(folder, SWT.CLOSE);
		item.setText("Item "+i);
		Text text = new Text(folder, SWT.MULTI);
		text.setText("Content for Item "+i +"\n\n\n\n");
		item.setControl(text);
	}

	Label label = new Label(folder, SWT.NONE);
	label.setText("buutt");
	folder.setTopRight(label, SWT.RIGHT | SWT.WRAP);

	shell.open();
	while (!shell.isDisposed()) {
		if (!display.readAndDispatch())
			display.sleep();
	}
}
Comment 4 Eclipse Genie CLA 2021-12-31 12:09:09 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/189216
Comment 5 Jörg Kubitz CLA 2021-12-31 12:19:58 EST
(In reply to Eclipse Genie from comment #4)
> New Gerrit change created:
> https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/189216

please test if that solves you problem
Comment 6 Phil Beauvoir CLA 2022-01-01 11:10:21 EST
(In reply to Jörg Kubitz from comment #5)
> (In reply to Eclipse Genie from comment #4)
> > New Gerrit change created:
> > https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/189216
> 
> please test if that solves you problem

Yes, this fixes the issues described in the original report. Thanks!