aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2013-02-11 15:38:46 (EST)
committerCarolyn MacLeod2013-04-09 10:53:07 (EDT)
commit32611ad6724ef140a85b4fdc67366e293dd05a71 (patch)
tree1f49267b033fb377a9dd758cc9679d72041f00c5
parent393999dd1a1e13d3148ce7140042a71993246585 (diff)
downloadeclipse.platform.swt-32611ad6724ef140a85b4fdc67366e293dd05a71.zip
eclipse.platform.swt-32611ad6724ef140a85b4fdc67366e293dd05a71.tar.gz
eclipse.platform.swt-32611ad6724ef140a85b4fdc67366e293dd05a71.tar.bz2
Bug 181592 - [Widgets] Need a color constant for active and inactive hyperlink colors
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
index 24e0e51..77ecd9b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
@@ -1831,6 +1831,14 @@ double /*float*/ [] getWidgetColorRGB (int id) {
case SWT.COLOR_LIST_BACKGROUND: color = NSColor.textBackgroundColor(); break;
case SWT.COLOR_LIST_SELECTION_TEXT: color = NSColor.selectedTextColor(); break;
case SWT.COLOR_LIST_SELECTION: color = NSColor.selectedTextBackgroundColor(); break;
+ case SWT.COLOR_LINK_FOREGROUND:
+ NSTextView textView = (NSTextView)new NSTextView().alloc();
+ textView.init ();
+ NSDictionary dict = textView.linkTextAttributes();
+ color = new NSColor(dict.valueForKey(OS.NSForegroundColorAttributeName));
+ textView.release ();
+ break;
+
}
return getNSColorRGB (color);
}
@@ -2940,7 +2948,7 @@ NSFont getFont (long /*int*/ cls, long /*int*/ sel) {
}
void initColors () {
- colors = new double /*float*/ [SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT + 1][];
+ colors = new double /*float*/ [SWT.COLOR_LINK_FOREGROUND + 1][];
colors[SWT.COLOR_INFO_FOREGROUND] = getWidgetColorRGB(SWT.COLOR_INFO_FOREGROUND);
colors[SWT.COLOR_INFO_BACKGROUND] = getWidgetColorRGB(SWT.COLOR_INFO_BACKGROUND);
colors[SWT.COLOR_TITLE_FOREGROUND] = getWidgetColorRGB(SWT.COLOR_TITLE_FOREGROUND);
@@ -2960,6 +2968,7 @@ void initColors () {
colors[SWT.COLOR_LIST_BACKGROUND] = getWidgetColorRGB(SWT.COLOR_LIST_BACKGROUND);
colors[SWT.COLOR_LIST_SELECTION_TEXT] = getWidgetColorRGB(SWT.COLOR_LIST_SELECTION_TEXT);
colors[SWT.COLOR_LIST_SELECTION] = getWidgetColorRGB(SWT.COLOR_LIST_SELECTION);
+ colors[SWT.COLOR_LINK_FOREGROUND] = getWidgetColorRGB(SWT.COLOR_LINK_FOREGROUND);
alternateSelectedControlColor = getNSColorRGB(NSColor.alternateSelectedControlColor());
alternateSelectedControlTextColor = getNSColorRGB(NSColor.alternateSelectedControlTextColor());