Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDejan Gloszic2006-04-20 02:30:16 +0000
committerDejan Gloszic2006-04-20 02:30:16 +0000
commit0b77bb9e0bf7c6f91212454fad0d773fe5e5f351 (patch)
tree3a585f97cee4f431fcd72f2f62ce4e45117ed19b /org.eclipse.ui.intro.universal
parent63a515051b34c51f42472c4812b087f8bffbff69 (diff)
downloadeclipse.platform.ua-0b77bb9e0bf7c6f91212454fad0d773fe5e5f351.tar.gz
eclipse.platform.ua-0b77bb9e0bf7c6f91212454fad0d773fe5e5f351.tar.xz
eclipse.platform.ua-0b77bb9e0bf7c6f91212454fad0d773fe5e5f351.zip
130188 [Intro] Eclipse Welcome Accessibility - High Contrast
Diffstat (limited to 'org.eclipse.ui.intro.universal')
-rw-r--r--org.eclipse.ui.intro.universal/introContent.xml14
-rw-r--r--org.eclipse.ui.intro.universal/plugin.xml45
-rw-r--r--org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IUniversalIntroConstants.java3
-rw-r--r--org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroConfigurer.java27
-rw-r--r--org.eclipse.ui.intro.universal/themes/circles/html/shared.css27
5 files changed, 109 insertions, 7 deletions
diff --git a/org.eclipse.ui.intro.universal/introContent.xml b/org.eclipse.ui.intro.universal/introContent.xml
index 0f3ed982c..54b5e8f36 100644
--- a/org.eclipse.ui.intro.universal/introContent.xml
+++ b/org.eclipse.ui.intro.universal/introContent.xml
@@ -52,7 +52,7 @@
<group id="page-links" computed="true">
</group>
<group id="action-links">
- <link url="http://org.eclipse.ui.intro/switchToLaunchBar" label="Workbench" id="workbench">
+ <link url="http://org.eclipse.ui.intro/switchToLaunchBar" label="Workbench" id="workbench" style-id="$high-contrast$">
<text>Go to the workbench</text>
</link>
</group>
@@ -85,7 +85,7 @@
<group id="page-links" computed="true">
</group>
<group id="action-links">
- <link url="http://org.eclipse.ui.intro/switchToLaunchBar" label="Workbench" id="workbench">
+ <link url="http://org.eclipse.ui.intro/switchToLaunchBar" label="Workbench" id="workbench" style-id="$high-contrast$">
<text>Go to the workbench</text>
</link>
</group>
@@ -115,7 +115,7 @@
<group id="page-links" computed="true">
</group>
<group id="action-links">
- <link url="http://org.eclipse.ui.intro/switchToLaunchBar" label="Workbench" id="workbench">
+ <link url="http://org.eclipse.ui.intro/switchToLaunchBar" label="Workbench" id="workbench" style-id="$high-contrast$">
<text>Go to the workbench</text>
</link>
</group>
@@ -145,7 +145,7 @@
<group id="page-links" computed="true">
</group>
<group id="action-links">
- <link url="http://org.eclipse.ui.intro/switchToLaunchBar" label="Workbench" id="workbench">
+ <link url="http://org.eclipse.ui.intro/switchToLaunchBar" label="Workbench" id="workbench" style-id="$high-contrast$">
<text>Go to the workbench</text>
</link>
</group>
@@ -174,7 +174,7 @@
<group id="page-links" computed="true">
</group>
<group id="action-links">
- <link url="http://org.eclipse.ui.intro/switchToLaunchBar" label="Workbench" id="workbench">
+ <link url="http://org.eclipse.ui.intro/switchToLaunchBar" label="Workbench" id="workbench" style-id="$high-contrast$">
<text>Go to the workbench</text>
</link>
</group>
@@ -203,7 +203,7 @@
<group id="page-links" computed="true">
</group>
<group id="action-links">
- <link url="http://org.eclipse.ui.intro/switchToLaunchBar" label="Workbench" id="workbench">
+ <link url="http://org.eclipse.ui.intro/switchToLaunchBar" label="Workbench" id="workbench" style-id="$high-contrast$">
<text>Go to the workbench</text>
</link>
</group>
@@ -233,7 +233,7 @@
<group id="page-links" computed="true">
</group>
<group id="action-links">
- <link url="http://org.eclipse.ui.intro/switchToLaunchBar" label="Workbench" id="workbench">
+ <link url="http://org.eclipse.ui.intro/switchToLaunchBar" label="Workbench" id="workbench" style-id="$high-contrast$">
<text>Go to the workbench</text>
</link>
</group>
diff --git a/org.eclipse.ui.intro.universal/plugin.xml b/org.eclipse.ui.intro.universal/plugin.xml
index ed7e8800d..56b9d28f4 100644
--- a/org.eclipse.ui.intro.universal/plugin.xml
+++ b/org.eclipse.ui.intro.universal/plugin.xml
@@ -75,6 +75,36 @@
value="$theme$graphics/launchbar/migrate16.png"/>
<property name="launchbarWebresourcesIcon"
value="$theme$graphics/launchbar/webresources16.png"/>
+
+ <property name="highContrast-overview"
+ value="$theme$graphics/icons/ctool/overview.png"/>
+ <property name="highContrast-firststeps"
+ value="$theme$graphics/icons/ctool/firststeps.png"/>
+ <property name="highContrast-tutorials"
+ value="$theme$graphics/icons/ctool/tutorials.png"/>
+ <property name="highContrast-samples"
+ value="$theme$graphics/icons/ctool/samples.png"/>
+ <property name="highContrast-whatsnew"
+ value="$theme$graphics/icons/ctool/whatsnew.png"/>
+ <property name="highContrast-webresources"
+ value="$theme$graphics/icons/ctool/webresources.png"/>
+ <property name="highContrast-migrate"
+ value="$theme$graphics/icons/ctool/migrate.png"/>
+
+ <property name="highContrastNav-overview"
+ value="$theme$graphics/icons/ctool/ov_nav.png"/>
+ <property name="highContrastNav-firststeps"
+ value="$theme$graphics/icons/ctool/fs_nav.png"/>
+ <property name="highContrastNav-tutorials"
+ value="$theme$graphics/icons/ctool/tu_nav.png"/>
+ <property name="highContrastNav-samples"
+ value="$theme$graphics/icons/ctool/sa_nav.png"/>
+ <property name="highContrastNav-whatsnew"
+ value="$theme$graphics/icons/ctool/wn_nav.png"/>
+ <property name="highContrastNav-webresources"
+ value="$theme$graphics/icons/ctool/wr_nav.png"/>
+ <property name="highContrastNav-migrate"
+ value="$theme$graphics/icons/ctool/mi_nav.png"/>
</theme>
<theme
id="org.eclipse.ui.intro.universal.purpleMesh"
@@ -99,6 +129,21 @@
value="$theme$graphics/launchbar/migrate16.png"/>
<property name="launchbarWebresourcesIcon"
value="$theme$graphics/launchbar/webresources16.png"/>
+
+ <property name="highContrast-overview"
+ value="$theme$graphics/icons/etool/overview72.gif"/>
+ <property name="highContrast-firststeps"
+ value="$theme$graphics/icons/etool/firsteps72.gif"/>
+ <property name="highContrast-tutorials"
+ value="$theme$graphics/icons/etool/tutorials72.gif"/>
+ <property name="highContrast-samples"
+ value="$theme$graphics/icons/etool/samples72.gif"/>
+ <property name="highContrast-whatsnew"
+ value="$theme$graphics/icons/etool/whatsnew72.gif"/>
+ <property name="highContrast-webresources"
+ value="$theme$graphics/icons/etool/webrsrc72.gif"/>
+ <property name="highContrast-migrate"
+ value="$theme$graphics/icons/etool/migrate72.gif"/>
</theme>
</extension>
</plugin>
diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IUniversalIntroConstants.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IUniversalIntroConstants.java
index 2abb853c8..d2eb6c178 100644
--- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IUniversalIntroConstants.java
+++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IUniversalIntroConstants.java
@@ -110,4 +110,7 @@ public interface IUniversalIntroConstants {
String LAUNCHBAR_WHATSNEW_ICON = "launchbarWhatsnewIcon"; //$NON-NLS-1$
String LAUNCHBAR_MIGRATE_ICON = "launchbarMigrateIcon"; //$NON-NLS-1$
String LAUNCHBAR_WEBRESOURCES_ICON = "launchbarWebresourcesIcon"; //$NON-NLS-1$
+ String HIGH_CONTRAST_PREFIX = "highContrast-"; //$NON-NLS-1$
+ String HIGH_CONTRAST_NAV_PREFIX = "highContrastNav-"; //$NON-NLS-1$
+ String HIGH_CONTRAST = "high-contrast"; //$NON-NLS-1$
}
diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroConfigurer.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroConfigurer.java
index 69889fc01..5ea6f2bcf 100644
--- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroConfigurer.java
+++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroConfigurer.java
@@ -24,6 +24,7 @@ import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.jface.action.Action;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.intro.universal.util.ImageUtil;
import org.eclipse.ui.intro.IIntroSite;
import org.eclipse.ui.intro.config.IntroConfigurer;
@@ -46,6 +47,13 @@ public class UniversalIntroConfigurer extends IntroConfigurer implements
}
public String getVariable(String variableName) {
+ if (variableName.equals(HIGH_CONTRAST)) {
+ boolean highContrast = PlatformUI.getWorkbench().getDisplay().getHighContrast();
+ if (highContrast)
+ return variableName;
+ else
+ return ""; //$NON-NLS-1$
+ }
IProduct product = Platform.getProduct();
if (product != null) {
// try product property first
@@ -362,6 +370,13 @@ public class UniversalIntroConfigurer extends IntroConfigurer implements
img.setAttribute("id", imgId); //$NON-NLS-1$
img.setAttribute("style-id", "content-img"); //$NON-NLS-1$ //$NON-NLS-2$
// img.setAttribute("src", imgSrc); //$NON-NLS-1$
+ boolean highContrast = PlatformUI.getWorkbench().getDisplay().getHighContrast();
+ if (highContrast) {
+ String key = HIGH_CONTRAST_PREFIX+id;
+ String value = getVariable(key);
+ if (value!=null)
+ img.setAttribute("src", value); //$NON-NLS-1$
+ }
img.setAttribute("alt", imgAlt); //$NON-NLS-1$
IntroElement text = new IntroElement("text"); //$NON-NLS-1$
text.setValue(imgText);
@@ -376,6 +391,18 @@ public class UniversalIntroConfigurer extends IntroConfigurer implements
element.setAttribute("label", label); //$NON-NLS-1$
element.setAttribute("url", url); //$NON-NLS-1$
element.setAttribute("id", id); //$NON-NLS-1$
+ boolean highContrast = PlatformUI.getWorkbench().getDisplay().getHighContrast();
+ if (highContrast) {
+ IntroElement img = new IntroElement("img"); //$NON-NLS-1$
+ img.setAttribute("style-id", "content-img"); //$NON-NLS-1$ //$NON-NLS-2$
+ String key = HIGH_CONTRAST_NAV_PREFIX+id;
+ String value = getVariable(key);
+ if (value!=null)
+ img.setAttribute("src", value); //$NON-NLS-1$
+ img.setAttribute("alt", label); //$NON-NLS-1$
+ element.addChild(img);
+ styleId += " "+HIGH_CONTRAST; //$NON-NLS-1$
+ }
element.setAttribute("style-id", styleId); //$NON-NLS-1$
return element;
}
diff --git a/org.eclipse.ui.intro.universal/themes/circles/html/shared.css b/org.eclipse.ui.intro.universal/themes/circles/html/shared.css
index dabe06324..02b38dc1d 100644
--- a/org.eclipse.ui.intro.universal/themes/circles/html/shared.css
+++ b/org.eclipse.ui.intro.universal/themes/circles/html/shared.css
@@ -76,6 +76,10 @@ a .link-label {
font-weight : bold;
}
+#navigation-links a.high-contrast .link-label {
+ display : none !important;
+}
+
/* Text in links. */
a .text {
font-size : 8pt;
@@ -266,6 +270,13 @@ body, .page {
left : 9px;
}
+#navigation-links a.high-contrast img {
+ height: 32px;
+ width: 32px;
+ top: 5px;
+ left: 0px;
+}
+
/*
* Adjust image position for hover version.
*/
@@ -418,6 +429,22 @@ body, .page {
height : 64px;
}
+#action-links a.high-contrast img,
+#action-links a.high-contrast:hover img,
+#action-links a.high-contrast:focus img,
+#action-links a.high-contrast:active img {
+ display: none !important;
+}
+
+#action-links a.high-contrast .link-label,
+#action-links a.high-contrast:hover .link-label,
+#action-links a.high-contrast:focus .link-label,
+#action-links a.high-contrast:active .link-label {
+ display: block !important;
+ text-decoration: underline;
+ top : 5px;
+}
+
/*
* Lay out the page title and description
*/

Back to the top