diff options
author | Silenio Quarti <silenio> | 2003-08-11 18:14:11 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2003-08-11 18:14:11 +0000 |
commit | 475d6ed28099c8b3b22a3306f7bfc28ce6be74f7 (patch) | |
tree | bfbec8ea6c5f8e9ec34c75584ac2122a73cfa661 | |
parent | c8a4c8ca8f0753569faa5d8b2d2209b3b8e34b56 (diff) | |
download | eclipse.platform.swt-475d6ed28099c8b3b22a3306f7bfc28ce6be74f7.tar.gz eclipse.platform.swt-475d6ed28099c8b3b22a3306f7bfc28ce6be74f7.tar.xz eclipse.platform.swt-475d6ed28099c8b3b22a3306f7bfc28ce6be74f7.zip |
*** empty log message ***
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Canvas.java | 5 | ||||
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Canvas.java index 5430e93644..16cd779a79 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Canvas.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Canvas.java @@ -174,13 +174,14 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b } } + /* Move the children */ if (all) { Control [] children = _getChildren (); for (int i=0; i<children.length; i++) { Control child = children [i]; Rectangle rect = child.getBounds (); - if (Math.min(x + width, rect.x + rect.width) > Math.max (x, rect.x) && - Math.min(y + height, rect.y + rect.height) > Math.max (y, rect.y)) { + if (Math.min(x + width, rect.x + rect.width) >= Math.max (x, rect.x) && + Math.min(y + height, rect.y + rect.height) >= Math.max (y, rect.y)) { child.setLocation (rect.x + deltaX, rect.y + deltaY); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java index c82cfdff56..20afbd0370 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java @@ -172,15 +172,15 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b * The fix is to not use SW_SCROLLCHILDREN and move the children * explicitly after scrolling. */ - //if (all) flags |= OS.SW_SCROLLCHILDREN; +// if (all) flags |= OS.SW_SCROLLCHILDREN; OS.ScrollWindowEx (handle, deltaX, deltaY, lpRect, null, 0, null, flags); if (all) { Control [] children = _getChildren (); for (int i=0; i<children.length; i++) { Control child = children [i]; Rectangle rect = child.getBounds (); - if (Math.min(x + width, rect.x + rect.width) > Math.max (x, rect.x) && - Math.min(y + height, rect.y + rect.height) > Math.max (y, rect.y)) { + if (Math.min(x + width, rect.x + rect.width) >= Math.max (x, rect.x) && + Math.min(y + height, rect.y + rect.height) >= Math.max (y, rect.y)) { child.setLocation (rect.x + deltaX, rect.y + deltaY); } } |