diff options
author | Steve Northover <steve> | 2008-04-29 16:29:37 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2008-04-29 16:29:37 +0000 |
commit | 5ada5cab5a89e06d62f377a8e71a3222993b5597 (patch) | |
tree | 7d9b5d345994ad03a278881f2b821df0ebb00081 | |
parent | 98a4ef6a54b4148606d0ae44186fdde963260f6e (diff) | |
download | eclipse.platform.swt-5ada5cab5a89e06d62f377a8e71a3222993b5597.tar.gz eclipse.platform.swt-5ada5cab5a89e06d62f377a8e71a3222993b5597.tar.xz eclipse.platform.swt-5ada5cab5a89e06d62f377a8e71a3222993b5597.zip |
220642 - [open type] Open Type dialog does not work in high contrast
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java | 8 | ||||
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java index a80e4e004e..0a90f8146c 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java @@ -792,7 +792,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*lo if ((result != 0 && (lvItem.state & OS.LVIS_SELECTED) != 0)) { int clrSelection = -1; if (nmcd.iSubItem == 0) { - if (OS.GetFocus () == handle) { + if (OS.GetFocus () == handle || display.getHighContrast ()) { clrSelection = OS.GetSysColor (OS.COLOR_HIGHLIGHT); } else { if ((style & SWT.HIDE_SELECTION) == 0) { @@ -800,7 +800,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*lo } } } else { - if (OS.GetFocus () == handle) { + if (OS.GetFocus () == handle || display.getHighContrast ()) { clrText = OS.GetSysColor (OS.COLOR_HIGHLIGHTTEXT); clrTextBk = clrSelection = OS.GetSysColor (OS.COLOR_HIGHLIGHT); } else { @@ -3257,7 +3257,7 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int /*long*/ lPara } if (OS.IsWindowEnabled (handle)) { if (selected && (nmcd.iSubItem == 0 || (style & SWT.FULL_SELECTION) != 0)) { - if (OS.GetFocus () == handle) { + if (OS.GetFocus () == handle || display.getHighContrast ()) { drawSelected = true; data.foreground = OS.GetSysColor (OS.COLOR_HIGHLIGHTTEXT); data.background = clrSelectionBk = OS.GetSysColor (OS.COLOR_HIGHLIGHT); @@ -3661,7 +3661,7 @@ void sendPaintItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd) { } if (OS.IsWindowEnabled (handle)) { if (selected && (nmcd.iSubItem == 0 || (style & SWT.FULL_SELECTION) != 0)) { - if (OS.GetFocus () == handle) { + if (OS.GetFocus () == handle || display.getHighContrast ()) { drawSelected = true; if (selectionForeground != -1) { data.foreground = selectionForeground; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java index 070b65522b..881e95ae98 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java @@ -644,7 +644,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long if (!explorerTheme) { drawBackground = true; ignoreDrawBackground = false; - if (handle == OS.GetFocus () && OS.IsWindowEnabled (handle)) { + if ((handle == OS.GetFocus () || display.getHighContrast ()) && OS.IsWindowEnabled (handle)) { clrTextBk = OS.GetSysColor (OS.COLOR_HIGHLIGHT); } else { clrTextBk = OS.GetSysColor (OS.COLOR_3DFACE); |