summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorSilenio Quarti2013-02-11 15:38:46 (EST)
committer Lakshmi Shanmugam2013-02-28 03:25:57 (EST)
commit218d59ed6bdc7ea6cdc8c68feb8c1fea2408b2ac (patch)
treef23fd2b9f53dae15556034f87e56c3de42f553de
parent6e11fadef6faaed385063ebfe83be4d4294d3049 (diff)
downloadeclipse.platform.swt-218d59ed6bdc7ea6cdc8c68feb8c1fea2408b2ac.zip
eclipse.platform.swt-218d59ed6bdc7ea6cdc8c68feb8c1fea2408b2ac.tar.gz
eclipse.platform.swt-218d59ed6bdc7ea6cdc8c68feb8c1fea2408b2ac.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());