Bug 441387 - [Themes] Dark theme: when comparing structure background on compare editors ends up white
Summary: [Themes] Dark theme: when comparing structure background on compare editors e...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: 4.16 M3   Edit
Assignee: Lars Vogel CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks: 497562 560385
  Show dependency tree
 
Reported: 2014-08-07 16:43 EDT by Fabio Zadrozny CLA
Modified: 2020-05-11 08:27 EDT (History)
3 users (show)

See Also:


Attachments
Screenshot showing issue on 4.5m7 (70.79 KB, image/png)
2015-05-06 09:47 EDT, Fabio Zadrozny CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Zadrozny CLA 2014-08-07 16:43:25 EDT
To reproduce:

create the structure:

folder:d1
  file: a.txt
    contents: 
        aaa
        bbb


folder:d2
  file: a.txt
    contents: 
        aaa
        ccc
        bbb

  file: b.txt
    contents:
        bbb

Click both folders > compare with each other, double-click b.txt: one side has a white background that it shouldn't have. Now, double-click a.txt: that same side still has the white background (even having text).


I think that the issue is that in org.eclipse.compare.internal.MergeSourceViewer.setEnabled(boolean), the MergeSourceViewer does:

	public void setEnabled(boolean enabled) {
		if (enabled != fEnabled) {
			fEnabled= enabled;
			StyledText c= getSourceViewer().getTextWidget();
			if (c != null) {
				c.setEnabled(enabled);
				Display d= c.getDisplay();
				c.setBackground(enabled ? d.getSystemColor(SWT.COLOR_LIST_BACKGROUND) : null);
			}
		}
	}

I think the fix would be simply removing the setBackground from that function (not sure why it was added on the first place).
Comment 1 Lars Vogel CLA 2015-05-06 01:52:13 EDT
Fabio, is this still relevant?
Comment 2 Fabio Zadrozny CLA 2015-05-06 09:47:27 EDT
Created attachment 253226 [details]
Screenshot showing issue on 4.5m7

Yes, it's still relevant (I'm posting a screenshot)
Comment 3 Fabio Zadrozny CLA 2015-05-06 09:49:29 EDT
As a note on the screenshot, the text is unreadable in the left side (there's white foreground on a white background) -- the screenshot doesn't make that explicit because you can't see the text ;)
Comment 4 Eclipse Genie CLA 2020-02-11 12:21:04 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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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 5 Lars Vogel CLA 2020-02-11 12:24:46 EST
.
Comment 6 Eclipse Genie CLA 2020-05-11 08:05:03 EDT
New Gerrit change created: https://git.eclipse.org/r/162819
Comment 7 Lars Vogel CLA 2020-05-11 08:27:06 EDT
Thanks Fabio for reporting.