diff options
author | Grant Gayed <ggayed> | 2004-01-20 17:15:05 +0000 |
---|---|---|
committer | Grant Gayed <ggayed> | 2004-01-20 17:15:05 +0000 |
commit | bccc589a105ee7f59092bce7c6038d31ce23d574 (patch) | |
tree | 1c77f24667d8da848b8cac14c9a542d06ab62be9 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java | |
parent | 5a8cb08e8087589e7d19940d8bf3f1aaafd57c94 (diff) | |
download | eclipse.platform.swt-bccc589a105ee7f59092bce7c6038d31ce23d574.tar.gz eclipse.platform.swt-bccc589a105ee7f59092bce7c6038d31ce23d574.tar.xz eclipse.platform.swt-bccc589a105ee7f59092bce7c6038d31ce23d574.zip |
*** empty log message ***
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java index 7814fa8120..1f18c961e0 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java @@ -183,8 +183,8 @@ public Rectangle getBounds (int index) { OS.SendMessage (hwnd, OS.LVM_GETSUBITEMRECT, itemIndex, iconRect); rect.left = iconRect.left - gridWidth; } - int width = rect.right - rect.left - gridWidth * 2; - int height = rect.bottom - rect.top - gridWidth * 2; + int width = Math.max (0, rect.right - rect.left - gridWidth * 2); + int height = Math.max (0, rect.bottom - rect.top - gridWidth * 2); /* * Bug in Windows. In version 5.80 of COMCTL32.DLL, the top * of the rectangle returned by LVM_GETSUBITEMRECT is off by @@ -351,8 +351,8 @@ public Rectangle getImageBounds (int index) { if (index == 0) { rect.left -= gridWidth; } - int width = rect.right - rect.left - gridWidth * 2; - int height = rect.bottom - rect.top - gridWidth * 2; + int width = Math.max (0, rect.right - rect.left - gridWidth * 2); + int height = Math.max (0, rect.bottom - rect.top - gridWidth * 2); if (index != 0) { LVITEM lvItem = new LVITEM (); lvItem.mask = OS.LVIF_IMAGE; |