Community
Participate
Working Groups
I20100513-1500 I am using the default colors on Ubuntu 10.04 and some of the tooltips display black text on black background. Will attach a screenshot.
Created attachment 168589 [details] screenshot
The default colors for tooltips on Ubuntu 10.04 are black background with white text.
Created attachment 168593 [details] same problem with code completion proposals
Our Helios plan states that Ubuntu 10.04 is one of our target platforms.
*** This bug has been marked as a duplicate of bug 309907 ***
Dani, are you sure this is really a duplicate of bug 309907? The proposed patch will fix the issue for SWT ToolTip, but both attached screenshots don't look like ToolTip is being used - it looks more like your AbstractInformationControl to me. Note that SWT's display.getSystemColor(SWT.COLOR_INFO_FOREGROUND) correctly returns white on Ubuntu 10.04 when using the default color scheme.
Created attachment 168658 [details] another case Here is another example - the bulk of the text has the correct color (white) but some parts are again black foreground on black background.
Note that the text in the bottom line "Press F2 for focus" is not visible, too.
You're right Boris. It's not a dup. There are two issues: 1) The Source hover. Here we can't do much as we use the fg colors used by the editor but with info bg. In cases like this the user can simply change the background color manually. No plans to add Ubuntu specific code here. 2) The bad coloring in the Javadoc hover: here we probably take the wrong color when rendering links and the F2 hint. Should probably use info fg here as well.
Created attachment 169101 [details] another case - less problems (In reply to comment #7) > Created an attachment (id=168658) [details] > another case > > Here is another example - the bulk of the text has the correct color (white) > but some parts are again black foreground on black background. Strange, I can't reproduce the bad links. I just started with the Ubuntu 10.04 CD, installed a JRE, and then started Eclipse I20100518-0800. I see the problem with the black-on-black info message at the bottom, but the links in the header (to "Control" and "Object") are looking fine for me.
(In reply to comment #10) > Strange, I can't reproduce the bad links. Same here, I cannot reproduce the issue now, but it did happen consistently when I made the screenshots.
OK, got it. The "another case" can be reproduced like this (also on WinXP): - set the info bg color in the OS to black and the info fg color to white - start Eclipse - set the info bg color in the OS to something bright / info fg color to black => hovers will show this problem until you restart Eclipse. Reason is that the stylesheet uses "color: InfoText" for these header links, which is updated on-the-fly when the OS settings change. But HTMLPrinter caches the system colors on startup and doesn't update them later. So we have 3 problems: 1. temporary header link color problems (bug 313530). 2. bad source hover bg if info background color is black (bug 309334) 3. F2 affordance not readable Will keep this bug for 3. and attach a patch that doesn't use SWT.COLOR_WIDGET_DARK_SHADOW.
Created attachment 169245 [details] Fix
Raksha & Deepak, could you please review the fix and give your +1 for RC2 if OK? To reproduce under WindowsXP, you can change the colors in "Control Panel > Display > Appearance > Advanced > Item: Tooltip". Note that for the Javadoc hover, you will have to restart Eclipse after changing the colors due to problem 2 from comment 12 (bug 313530).
(In reply to comment #1) > Created an attachment (id=168589) [details] [diff] > screenshot (In reply to comment #3) > Created an attachment (id=168593) [details] [diff] > same problem with code completion proposals (In reply to comment #7) > Created an attachment (id=168658) [details] [diff] > another case I do not see a difference with or without the patch in any of these cases. (Note: I always see 'Press F2 for focus' text - it is dark in both cases but readable)
> I do not see a difference with or without the patch in any of these cases. > (Note: I always see 'Press F2 for focus' text - it is dark in both cases but > readable) That's actually a good result, assuming you tested it also with the default hover colors. ;-) The unreadable text in the source hovers is bug 309334 and won't be fixed for now. The user can set a different "Source hover background" color in Preferences > Java > Editor. This bug only fixes the message at the bottom. The old code used SWT.COLOR_WIDGET_DARK_SHADOW, which is dark gray on WinXP, but is completely black on Ubuntu 10.04. To see a difference on WinXP, you could set the tooltip bg color to dark gray (same color as the message is rendered in HEAD). Then, the message will be invisible (or very hard to read) with HEAD, but should be more visible with the patch (because it calculates the color based on the actual fg and bg colors). In the Java source hover, the blending is calculated between the default Java text color and the "Source hover background" color (if we wouldn't do that, the message would not be visible when the user has white-on-black tooltips but a bright "Source hover background" color). Please also check that the newly created Color objects are properly disposed.
(In reply to comment #16) > > In the Java source hover, the blending is calculated between the default Java > text color and the "Source hover background" color (if we wouldn't do that, the > message would not be visible when the user has white-on-black tooltips but a > bright "Source hover background" color). > Yes, it works when I set bg to gray shades, the font is set to some color in between gray and white and visible after the patch is applied. > Please also check that the newly created Color objects are properly disposed. It looks ok. I have one question , why do you check for !Color.isDisposed() everywhere before disposing and just check for null here? except here? /cvsroot/eclipse/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java, if (fStatusLabelForeground != null) { fStatusLabelForeground.dispose(); fStatusLabelForeground= null; } +1 for RC2.
(In reply to comment #17) > why do you check for > !Color.isDisposed() everywhere before disposing and just check for null here? I just followed the pattern of the surrounding code. The isDisposed() check is useless and I would have removed it if we weren't in RC2 already. Now, patches should have minimal changes, and I just adapted to the style of the existing code.
(In reply to comment #18) > (In reply to comment #17) > > why do you check for > > !Color.isDisposed() everywhere before disposing and just check for null here? > > I just followed the pattern of the surrounding code. The isDisposed() check is > useless and I would have removed it if we weren't in RC2 already. Now, patches > should have minimal changes, and I just adapted to the style of the existing > code. Okay. +1 for RC2 then.
(In reply to comment #16) > That's actually a good result, assuming you tested it also with the default > hover colors. ;-) The unreadable text in the source hovers is bug 309334 and > won't be fixed for now. The user can set a different "Source hover background" > color in Preferences > Java > Editor. > > This bug only fixes the message at the bottom. The old code used > SWT.COLOR_WIDGET_DARK_SHADOW, which is dark gray on WinXP, but is completely > black on Ubuntu 10.04. To see a difference on WinXP, you could set the tooltip > bg color to dark gray (same color as the message is rendered in HEAD). Then, > the message will be invisible (or very hard to read) with HEAD, but should be > more visible with the patch (because it calculates the color based on the > actual fg and bg colors). Alright, I see the color blending now :) +1 for RC2.
+1 for RC2. Regarding calling isDisposed(): actually the test is required according to the current spec/Javadoc. Unless SWT changes that spec, the right thing is to have that test in place. ==> we should either add it to AIC as well or file a bug against SWT. I would fix the Javadoc for blend(...): add newline before the first Javadoc tag and no newline between tags.
Fixed in HEAD. Will file a bug for SWT to clean up their inconsistent Javadoc.
>Will file a bug for SWT to clean up their inconsistent Javadoc. k. please cc me.
> The user can set a different "Source hover background" > color in Preferences > Java > Editor Could this please be added to the readme as a workaround for a known issue when running Eclipse on Ubuntu 10.04?
I'm not sure this makes sense. First thing a user will do is search in the preferences to change the colors and using 'color' keyword finds the relevant pages. Also, there might be other places that needs tweaking with that specific color scheme. I wouldn't add this but I leave the final decision to Markus.
I don't think it's worth blowing up the Readme with this. Ubuntu 10.04 users will have a lot of other problems with the default theme, so this case is not so special. And I doubt that a Readme entry would really reduce traffic about this. If we do something for 3.6, then we should release the patch in bug 313943. +1s on that bug could help convincing the component lead...
Verified for 3.6 RC2 with I20100520-1744
For readers who reach this thread via Google, I'm posting a link on how to solve the black-background issue. It steps through changing Ubuntu's tooltips colors. I think it makes more sense to change Ubuntu's colors than to change Elcipse's colors. http://tipstank.com/2010/05/23/solve-eclipse-black-pop-up-code-assist-box-in-ubuntu-10-4-lucid/