Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330680 - Refactoring Signature Preview bg color is changed to default, hard to read with light syntax coloring
Summary: Refactoring Signature Preview bg color is changed to default, hard to read wi...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 M4   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-19 11:32 EST by Chris Williams CLA
Modified: 2010-11-25 10:29 EST (History)
1 user (show)

See Also:


Attachments
Patch to avoid changing bg color to parent widget's (4.66 KB, patch)
2010-11-19 11:54 EST, Chris Williams CLA
no flags Details | Diff
Fix (2.69 KB, patch)
2010-11-25 10:29 EST, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Williams CLA 2010-11-19 11:32:02 EST
Build Identifier: M20100909-0800

ExtractMethodInputPage, line 314. This explicitly sets the background color of the signature preview text widget to be the same as the parent composite, which is going to the be standard gray.  If the user has set up preference in such a way that they use light fg colors on top of a dark bg color for their Java syntax coloring, this makes the preview very hard to read.

This particular "bug" is also in any other Refactoring action that provides a signature preview on the first page of the dialog.

Reproducible: Always

Steps to Reproduce:
1. Set a black bg and white fg in Preferences > General > Editors > Text Editors
2. Create a simple hello world Java file.
3. Try to Refactor > Extract Method a line of code.
Comment 1 Chris Williams CLA 2010-11-19 11:54:23 EST
Created attachment 183486 [details]
Patch to avoid changing bg color to parent widget's

This is a possible fix. This just removes the lines that override the bg color of the signature preview text widget with the parent's bg color. A more sophisticated patch might want to try and compare the bg color to see if it's "close" to the parent's bg color and if so then override (i.e. if the text bg is white, and the parent is light gray, then using light gray for the text bg probably won't hurt and would make the UI a little nicer; However, using light gray when the text bg was close to black would make it hard to read).
Comment 2 Markus Keller CLA 2010-11-25 10:29:33 EST
Created attachment 183861 [details]
Fix

This problem is similar to bug 313943. I agree it's a problem in your setup, but in general, it looks better with a default widget background color.

This fix only sets the default bg color if it's visually distinct from the configured editor bg color.
Comment 3 Markus Keller CLA 2010-11-25 10:29:58 EST
Fixed in HEAD.