summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Northover <steve>2003-08-08 22:30:33 +0000
committerSteve Northover <steve>2003-08-08 22:30:33 +0000
commitdac4800c8efbce7f1c43645913b07c7017ce3d3e (patch)
tree0cd5b0ae86329f77451a8c475714fca0ada10420
parent060dafd8659c6172dae888c79a06bee8479f97cc (diff)
downloadeclipse.platform.swt-dac4800c8efbce7f1c43645913b07c7017ce3d3e.tar.gz
eclipse.platform.swt-dac4800c8efbce7f1c43645913b07c7017ce3d3e.tar.xz
eclipse.platform.swt-dac4800c8efbce7f1c43645913b07c7017ce3d3e.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Canvas.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Canvas.java
index f8d7b25a19..be3529b713 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Canvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Canvas.java
@@ -161,6 +161,17 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b
GC gc = new GC (this);
gc.copyArea (x, y, width, height, destX, destY);
gc.dispose ();
+ 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)) {
+ child.setLocation (rect.x + deltaX, rect.y + deltaY);
+ }
+ }
+ }
if (isFocus) caret.setFocus ();
}