| Summary: | ColorSelector should show some color preview | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Austin Riddle <austin.riddle> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 1.3 | ||
| Target Milestone: | 1.3 M7 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Fixed in a similar way in ColorSelector.Three unicode characters \u2588 ( full block ) are used in the text instead of '#'. |
Since it is not possible at the moment to have the color previewed via normal means, I just thought I would share this patch, which uses text to show the currently selected color: ### Eclipse Workspace Patch 1.0 #P org.eclipse.rap.jface Index: src/org/eclipse/jface/preference/ColorSelector.java =================================================================== RCS file: /cvsroot/rt/org.eclipse.rap/runtime.ui/org.eclipse.rap.jface/src/org/eclipse/jface/preference/ColorSelector.java,v retrieving revision 1.4 diff -u -r1.4 ColorSelector.java --- src/org/eclipse/jface/preference/ColorSelector.java 11 Sep 2009 09:31:31 -0000 1.4 +++ src/org/eclipse/jface/preference/ColorSelector.java 30 Mar 2010 18:18:59 -0000 @@ -74,6 +74,7 @@ // gc.fillRectangle(0, 0, fExtent.x, fExtent.y); // gc.dispose(); // fButton.setImage(fImage); + fButton.setText("#####"); //$NON-NLS-1$ fButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { open(); @@ -208,6 +209,7 @@ // gc.fillRectangle(1, 3, fExtent.x - 2, fExtent.y - 5); // gc.dispose(); // fButton.setImage(fImage); + fButton.setForeground( fColor ); fButton.setBackground( fColor ); }