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 154692 Details for
Bug 289465
User defined gradient in high contrast display mode should be treated as solid fill color
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch
HighContrastGradientFix.txt (text/plain), 2.08 KB, created by
Lidija Grahek
on 2009-12-17 14:36:14 EST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Lidija Grahek
Created:
2009-12-17 14:36:14 EST
Size:
2.08 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.gmf.runtime.gef.ui >Index: src/org/eclipse/gmf/runtime/gef/ui/figures/NodeFigure.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.gef.ui/src/org/eclipse/gmf/runtime/gef/ui/figures/NodeFigure.java,v >retrieving revision 1.11 >diff -u -r1.11 NodeFigure.java >--- src/org/eclipse/gmf/runtime/gef/ui/figures/NodeFigure.java 30 Jan 2009 19:37:13 -0000 1.11 >+++ src/org/eclipse/gmf/runtime/gef/ui/figures/NodeFigure.java 17 Dec 2009 19:30:49 -0000 >@@ -30,6 +30,8 @@ > import org.eclipse.gmf.runtime.draw2d.ui.internal.figures.TransparentBorder; > import org.eclipse.swt.SWT; > import org.eclipse.swt.graphics.Path; >+import org.eclipse.swt.widgets.Display; >+import org.eclipse.ui.PlatformUI; > > /** > * Base class that most shape figures should extend from to gain default connection anchor behavior. >@@ -354,6 +356,16 @@ > */ > public void setGradientData(int gradientColor1, int gradientColor2, int gradientStyle) { > boolean doRepaint = false; >+ // When in high contrast mode, there is no gradient, so set bg color to null to allow inheriting >+ // the system color. >+ Display display = Display.getCurrent(); >+ if (display == null && PlatformUI.isWorkbenchRunning()) { >+ display = PlatformUI.getWorkbench().getDisplay(); >+ } >+ if (display != null && display.getHighContrast()) { >+ setBackgroundColor(null); >+ return; >+ } > if (gradientColor1 != this.gradientColor1 && gradientColor1 > -1) { > this.gradientColor1 = gradientColor1; > doRepaint = true; >@@ -378,6 +390,14 @@ > * @since 1.2 > */ > public boolean isUsingGradient() { >+ // When in high contrast mode, there is no gradient, so return false. >+ Display display = Display.getCurrent(); >+ if (display == null && PlatformUI.isWorkbenchRunning()) { >+ display = PlatformUI.getWorkbench().getDisplay(); >+ } >+ if (display != null && display.getHighContrast()) { >+ return false; >+ } > return isUsingGradient && gradientColor1 > -1 && gradientColor2 > -1; > } >
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 289465
:
147197
| 154692