diff options
author | Veronika Irvine <veronika> | 2005-03-28 14:52:58 +0000 |
---|---|---|
committer | Veronika Irvine <veronika> | 2005-03-28 14:52:58 +0000 |
commit | e6ff1db5126806ddfb223a9a1239d9143ed9a050 (patch) | |
tree | 65bccd2236c0388d6c40d4a84c9777a782e1d3b1 | |
parent | e20967617af3717759ff20eede347aa1cc9b832d (diff) | |
download | eclipse.platform.swt-e6ff1db5126806ddfb223a9a1239d9143ed9a050.tar.gz eclipse.platform.swt-e6ff1db5126806ddfb223a9a1239d9143ed9a050.tar.xz eclipse.platform.swt-e6ff1db5126806ddfb223a9a1239d9143ed9a050.zip |
Bug89163 - indent needs to be excluded from centering and right/bottom position calculations
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridLayout.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridLayout.java index 2e6d531682..1e5e169d45 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridLayout.java @@ -637,12 +637,12 @@ Point layout (Composite composite, boolean move, int x, int y, int width, int he switch (data.horizontalAlignment) { case SWT.CENTER: case GridData.CENTER: - childX = gridX + Math.max (0, (cellWidth - childWidth) / 2); + childX += Math.max (0, (cellWidth - data.horizontalIndent - childWidth) / 2); break; case SWT.RIGHT: case SWT.END: case GridData.END: - childX = gridX + Math.max (0, cellWidth - childWidth); + childX += Math.max (0, cellWidth - data.horizontalIndent - childWidth); break; case SWT.FILL: childWidth = cellWidth - data.horizontalIndent; @@ -654,12 +654,12 @@ Point layout (Composite composite, boolean move, int x, int y, int width, int he switch (data.verticalAlignment) { case SWT.CENTER: case GridData.CENTER: - childY = gridY + Math.max (0, (cellHeight - childHeight) / 2); + childY += Math.max (0, (cellHeight - data.verticalIndent - childHeight) / 2); break; case SWT.BOTTOM: case SWT.END: case GridData.END: - childY = gridY + Math.max (0, cellHeight - childHeight); + childY += Math.max (0, cellHeight - data.verticalIndent - childHeight); break; case SWT.FILL: childHeight = cellHeight - data.verticalIndent; |