diff options
author | Silenio Quarti <silenio> | 2003-06-27 21:40:13 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2003-06-27 21:40:13 +0000 |
commit | f4c18c2eb71828bfd96abc9ebfd2bcda6c33a2b4 (patch) | |
tree | 9cda02ecb0746690ba6853489d862ff4669c130e | |
parent | 7e647786f2866349c50c958c15b24a02f6e90626 (diff) | |
download | eclipse.platform.swt-f4c18c2eb71828bfd96abc9ebfd2bcda6c33a2b4.tar.gz eclipse.platform.swt-f4c18c2eb71828bfd96abc9ebfd2bcda6c33a2b4.tar.xz eclipse.platform.swt-f4c18c2eb71828bfd96abc9ebfd2bcda6c33a2b4.zip |
*** empty log message ***
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java | 2 | ||||
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java index a4c43fce02..f1dd8b5f76 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java @@ -42,6 +42,7 @@ public class List extends Scrollable { int itemCount, anchorFirst, anchorLast; boolean ignoreSelect; static final int COLUMN_ID = 1024; + static final int EXTRA_WIDTH = 25; /** * Constructs a new instance of this class given its parent @@ -199,6 +200,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { width = Math.max (width, extent.x); } gc.dispose (); + width += EXTRA_WIDTH; } else { width = wHint; } 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 0b94906151..f17e328437 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 @@ -787,7 +787,11 @@ public TableItem getItem (Point point) { //TODO - optimize for (int i=0; i<itemCount; i++) { if (OS.GetDataBrowserItemPartBounds (handle, i + 1, COLUMN_ID, OS.kDataBrowserPropertyEnclosingPart, rect) == OS.noErr) { - if (OS.PtInRect (pt, rect)) return items [i]; + if ((style & SWT.FULL_SELECTION) != 0) { + if (rect.top <= pt.v && pt.v < rect.bottom) return items [i]; + } else { + if (OS.PtInRect (pt, rect)) return items [i]; + } } } return null; |