diff options
author | Silenio Quarti <silenio> | 2005-05-20 20:26:52 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2005-05-20 20:26:52 +0000 |
commit | 24563e805b71d7f26c3047e203bc7379fb3a2ff6 (patch) | |
tree | 1afef35b882e714acbd01ed281c9a06e8186069f | |
parent | a0843f74d4e12fd014b36423a42de3c3ddd5e16b (diff) | |
download | eclipse.platform.swt-24563e805b71d7f26c3047e203bc7379fb3a2ff6.tar.gz eclipse.platform.swt-24563e805b71d7f26c3047e203bc7379fb3a2ff6.tar.xz eclipse.platform.swt-24563e805b71d7f26c3047e203bc7379fb3a2ff6.zip |
*** empty log message ***
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java | 10 | ||||
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java index 5cba6cf212..4522a924c5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java @@ -828,6 +828,8 @@ int drawItemProc (int browser, int id, int property, int itemState, int theRect, } if (columnIndex == columnCount) return OS.noErr; } + Rect controlRect = new Rect (); + OS.GetControlBounds (handle, controlRect); lastIndexOf = index; TableItem item = _getItem (index); if ((style & SWT.VIRTUAL) != 0) { @@ -836,7 +838,11 @@ int drawItemProc (int browser, int id, int property, int itemState, int theRect, if (setScrollWidth (item)) { Rect rect = new Rect(); if (OS.GetDataBrowserItemPartBounds (handle, id, property, OS.kDataBrowserPropertyEnclosingPart, rect) == OS.noErr) { - redrawWidget (handle, rect.left, rect.top, rect.right, rect.bottom, false); + int x = rect.left - controlRect.left; + int y = rect.top - controlRect.top; + int width = rect.right - rect.left; + int height = rect.bottom - rect.top; + redrawWidget (handle, x, y, width, height, false); } return OS.noErr; } @@ -849,8 +855,6 @@ int drawItemProc (int browser, int id, int property, int itemState, int theRect, int width = rect.right - rect.left; int height = rect.bottom - rect.top; boolean selected = (itemState & OS.kDataBrowserItemIsSelected) != 0; - Rect controlRect = new Rect (); - OS.GetControlBounds (handle, controlRect); x -= controlRect.left; y -= controlRect.top; GC gc = paintGC; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java index c474af36e5..8dc7c79fff 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java @@ -653,6 +653,8 @@ int drawItemProc (int browser, int id, int property, int itemState, int theRect, } if (columnIndex == columnCount) return OS.noErr; } + Rect controlRect = new Rect (); + OS.GetControlBounds (handle, controlRect); TreeItem item = items [index]; if ((style & SWT.VIRTUAL) != 0) { if (!item.cached) { @@ -660,7 +662,11 @@ int drawItemProc (int browser, int id, int property, int itemState, int theRect, if (setScrollWidth (item)) { Rect rect = new Rect(); if (OS.GetDataBrowserItemPartBounds (handle, id, property, OS.kDataBrowserPropertyEnclosingPart, rect) == OS.noErr) { - redrawWidget (handle, rect.left, rect.top, rect.right, rect.bottom, false); + int x = rect.left - controlRect.left; + int y = rect.top - controlRect.top; + int width = rect.right - rect.left; + int height = rect.bottom - rect.top; + redrawWidget (handle, x, y, width, height, false); } return OS.noErr; } @@ -673,8 +679,6 @@ int drawItemProc (int browser, int id, int property, int itemState, int theRect, int width = rect.right - rect.left; int height = rect.bottom - rect.top; boolean selected = (itemState & OS.kDataBrowserItemIsSelected) != 0; - Rect controlRect = new Rect (); - OS.GetControlBounds (handle, controlRect); x -= controlRect.left; y -= controlRect.top; GC gc = paintGC; |