Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 37698 Details for
Bug 75128
[CheatSheet] In HighContrast Screen set up Cheat Sheets are not visible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed Patch
patch075218.txt (text/plain), 4.04 KB, created by
Chris Goldthorpe
on 2006-04-04 19:53:32 EDT
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Chris Goldthorpe
Created:
2006-04-04 19:53:32 EDT
Size:
4.04 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.cheatsheets >Index: src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetPage.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetPage.java,v >retrieving revision 1.22 >diff -u -r1.22 CheatSheetPage.java >--- src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetPage.java 22 Mar 2006 06:39:38 -0000 1.22 >+++ src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetPage.java 4 Apr 2006 16:50:52 -0000 >@@ -39,7 +39,8 @@ > private Color introColor; > private Color activeColor; > >- private Color alternateColor; >+ private Color inactiveColor1; >+ private Color inactiveColor2; > > private CheatSheet cheatSheet; > >@@ -82,7 +83,7 @@ > // the intro item. > ArrayList items = cheatSheet.getItems(); > for (int i = 0; i < items.size(); i++) { >- Color color = (i % 2) == 0 ? backgroundColor : alternateColor; >+ Color color = (i % 2) == 0 ? getInactiveColor1() : getInactiveColor2(); > > CoreItem coreItem = new CoreItem(this, > (org.eclipse.ui.internal.cheatsheets.data.Item) items >@@ -94,6 +95,14 @@ > "CheatSheetPage.createInfoArea()", "Time in CheatSheetPage.createPart(): "); //$NON-NLS-1$ //$NON-NLS-2$ > } > >+ private Color getInactiveColor2() { >+ return inactiveColor2; >+ } >+ >+ private Color getInactiveColor1() { >+ return inactiveColor1; >+ } >+ > /** > * Creates the cheatsheet's title areawhich will consists of a title and > * image. >@@ -110,15 +119,18 @@ > public void dispose() { > super.dispose(); > >- if (alternateColor != null) >- alternateColor.dispose(); >+ if (getInactiveColor1() != null) >+ getInactiveColor1().dispose(); >+ if (getInactiveColor2() != null) >+ getInactiveColor2().dispose(); > > if (activeColor != null) > activeColor.dispose(); > > if (introColor != null) > introColor.dispose(); >- alternateColor = null; >+ inactiveColor1 = null; >+ inactiveColor2 = null; > activeColor = null; > introColor = null; > } >@@ -132,6 +144,11 @@ > RGB rgb; > RGB white = new RGB(255, 255, 255); > RGB black = new RGB(0, 0, 0); >+ >+ if (isReverseVideo()) { >+ computeReverseVideoColors(display); >+ return; >+ } > > if (toolkit.getColors().isWhiteBackground()) { > rgb = toolkit.getColors().getSystemColor(SWT.COLOR_LIST_SELECTION); >@@ -169,7 +186,7 @@ > // too dark - add 20% white > rgb = FormColors.blend(rgb, white, 80); > } >- alternateColor = new Color(display, rgb); >+ inactiveColor1 = new Color(display, rgb); > } else { > // colored background > rgb = toolkit.getColors().getSystemColor(SWT.COLOR_LIST_SELECTION); >@@ -209,11 +226,30 @@ > // white by 60% > else if (FormColors.testTwoPrimaryColors(rgb, 230, 256)) > rgb = FormColors.blend(rgb, black, 40); >- alternateColor = new Color(display, rgb); >+ inactiveColor1 = new Color(display, rgb); > } > rgb = activeColor.getRGB(); > rgb = FormColors.blend(rgb, white, 40); > introColor = new Color(display, rgb); >+ inactiveColor2 = new Color(display, backgroundColor.getRGB()); >+ } >+ >+ private void computeReverseVideoColors(Display display) { >+ Color background = toolkit.getColors().getBackground(); >+ RGB white = new RGB(255, 255, 255); >+ // Create new colors, they will get disposed >+ RGB rgb = background.getRGB(); >+ activeColor = new Color(display, rgb ); >+ rgb = FormColors.blend(rgb, white, 85); >+ inactiveColor1 = new Color(display, rgb); >+ rgb = FormColors.blend(rgb, white, 85); >+ inactiveColor2 = new Color(display, rgb ); >+ introColor = new Color(display, rgb ); >+ } >+ >+ private boolean isReverseVideo() { >+ Color bg = toolkit.getColors().getBackground(); >+ return ((bg.getBlue() + bg.getRed() + bg.getGreen()) < 380); > } > > public void initialized() { >@@ -227,10 +263,6 @@ > return activeColor; > } > >- public Color getAlternateColor() { >- return alternateColor; >- } >- > public ScrolledForm getForm() { > return form; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 75128
:
26415
|
36860
| 37698 |
37699
|
37761