summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Northover <steve>2005-06-06 23:27:46 +0000
committerSteve Northover <steve>2005-06-06 23:27:46 +0000
commit73f19fb22f36296b2b1d319322bf8eada9b8a2c1 (patch)
tree6a02268db8f0fed6e93d33e6138921d37d38bbd8
parent1dbfbf139723ccff851bd373086d24a81d3b6a39 (diff)
downloadeclipse.platform.swt-73f19fb22f36296b2b1d319322bf8eada9b8a2c1.tar.gz
eclipse.platform.swt-73f19fb22f36296b2b1d319322bf8eada9b8a2c1.tar.xz
eclipse.platform.swt-73f19fb22f36296b2b1d319322bf8eada9b8a2c1.zip
make setSize(), setLocation() and setBounds() consistent
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index 3b36ca485a..b693181159 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -479,7 +479,7 @@ public Rectangle getBounds () {
public void setBounds (Rectangle rect) {
checkWidget ();
if (rect == null) error (SWT.ERROR_NULL_ARGUMENT);
- setBounds (rect.x, rect.y, rect.width, rect.height);
+ setBounds (rect.x, rect.y, Math.max (0, rect.width), Math.max (0, rect.height), true, true);
}
/**
@@ -661,7 +661,7 @@ public Point getLocation () {
public void setLocation (Point location) {
checkWidget ();
if (location == null) error (SWT.ERROR_NULL_ARGUMENT);
- setLocation (location.x, location.y);
+ setBounds (location.x, location.y, 0, 0, true, false);
}
/**
@@ -729,7 +729,7 @@ public Point getSize () {
public void setSize (Point size) {
checkWidget ();
if (size == null) error (SWT.ERROR_NULL_ARGUMENT);
- setSize (size.x, size.y);
+ setBounds (0, 0, Math.max (0, size.x), Math.max (0, size.y), false, true);
}
/**