summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java
diff options
context:
space:
mode:
authorFelipe Heidrich <fheidric>2006-04-24 17:48:36 +0000
committerFelipe Heidrich <fheidric>2006-04-24 17:48:36 +0000
commit9f3f955d035544879b4768b5dbcbfc67ba4dd5b1 (patch)
treed61f94fe5eedc50b5b52458821d871251aef2ece /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java
parent7349d1b65ee9a9edeeac8e2e96a33b2c8d655b80 (diff)
downloadeclipse.platform.swt-9f3f955d035544879b4768b5dbcbfc67ba4dd5b1.tar.gz
eclipse.platform.swt-9f3f955d035544879b4768b5dbcbfc67ba4dd5b1.tar.xz
eclipse.platform.swt-9f3f955d035544879b4768b5dbcbfc67ba4dd5b1.zip
Bug 99145 - no hacky fix
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java17
1 files changed, 13 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java
index c9bee7cec9..c9fdf09cf1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java
@@ -889,14 +889,23 @@ LRESULT WM_SIZE (int wParam, int lParam) {
}
LRESULT wmColorChild (int wParam, int lParam) {
- int fg = foreground;
+ LRESULT result = super.wmColorChild (wParam, lParam);
+ /*
+ * Feature in Windows. When a SysLink is disabled, it does
+ * not gray out the non-link portion of the text. The fix
+ * is to set the text color to the system gray color.
+ */
if (OS.COMCTL32_MAJOR >= 6) {
if (!OS.IsWindowEnabled (handle)) {
- foreground = OS.GetSysColor (OS.COLOR_GRAYTEXT);
+ OS.SetTextColor (wParam, OS.GetSysColor (OS.COLOR_GRAYTEXT));
+ if (result == null) {
+ int backPixel = getBackgroundPixel ();
+ OS.SetBkColor (wParam, backPixel);
+ int hBrush = findBrush (backPixel, OS.BS_SOLID);
+ return new LRESULT (hBrush);
+ }
}
}
- LRESULT result = super.wmColorChild (wParam, lParam);
- foreground = fg;
return result;
}