summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2009-03-18 16:56:45 +0000
committerGrant Gayed <ggayed>2009-03-18 16:56:45 +0000
commitf7af67eb750d16cb78b69e519c2e9163f55f7288 (patch)
tree0fa22e74d03723315ba6400367736c08feda56a3 /bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java
parent101f48207327e1ff58cb127f6f3e8fe3a1f5f755 (diff)
downloadeclipse.platform.swt-f7af67eb750d16cb78b69e519c2e9163f55f7288.tar.gz
eclipse.platform.swt-f7af67eb750d16cb78b69e519c2e9163f55f7288.tar.xz
eclipse.platform.swt-f7af67eb750d16cb78b69e519c2e9163f55f7288.zip
267894 - computeSize of Tree/Table is wrong
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java
index f4b820f86f..621fec4c9d 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java
@@ -408,7 +408,10 @@ public String getToolTipText () {
*/
public int getWidth () {
checkWidget ();
- return (int)nsColumn.width();
+ int width = (int)nsColumn.width();
+ // TODO how to differentiate 0 and 1 cases?
+ if (width > 0) width += Table.CELL_GAP;
+ return width;
}
/**
@@ -674,6 +677,8 @@ public void setToolTipText (String string) {
public void setWidth (int width) {
checkWidget ();
if (width < 0) return;
+ // TODO how to differentiate 0 and 1 cases?
+ width = Math.max (0, width - Table.CELL_GAP);
nsColumn.setWidth (width);
}