diff options
author | Thorsten Hake | 2015-11-18 13:27:29 +0000 |
---|---|---|
committer | Niraj Modi | 2017-08-09 09:35:37 +0000 |
commit | a3ffb152c005b14af78dbeb2418309d647a196ba (patch) | |
tree | 575571f6639c93ab315ed00e02fbee778f556cf6 /bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom | |
parent | 397db9e1dca6e0a853777d316b8756845ddcfd78 (diff) | |
download | eclipse.platform.swt-a3ffb152c005b14af78dbeb2418309d647a196ba.tar.gz eclipse.platform.swt-a3ffb152c005b14af78dbeb2418309d647a196ba.tar.xz eclipse.platform.swt-a3ffb152c005b14af78dbeb2418309d647a196ba.zip |
Bug 298679 - [StyledText] Fixed left margin if alignment is set.
Change-Id: I7144cc95c1f0940e791526c3bb3c4326fe9e007c
Signed-off-by: Thorsten Hake <eclipse@thorsten-hake.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java index 7f6cbe3669..413fca4417 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java @@ -8582,7 +8582,7 @@ public void setBidiColoring(boolean mode) { */ public void setBottomMargin (int bottomMargin) { checkWidget(); - setMargins(leftMargin, topMargin, rightMargin, bottomMargin); + setMargins(getLeftMargin(), topMargin, rightMargin, bottomMargin); } /** * Moves the Caret to the current caret offset. @@ -9452,7 +9452,7 @@ public void setMarginColor(Color color) { */ public void setMargins (int leftMargin, int topMargin, int rightMargin, int bottomMargin) { checkWidget(); - this.leftMargin = Math.max(0, leftMargin); + this.leftMargin = Math.max(0, leftMargin) + alignmentMargin; this.topMargin = Math.max(0, topMargin); this.rightMargin = Math.max(0, rightMargin); this.bottomMargin = Math.max(0, bottomMargin); @@ -9509,7 +9509,7 @@ public void setOrientation(int orientation) { */ public void setRightMargin (int rightMargin) { checkWidget(); - setMargins(leftMargin, topMargin, rightMargin, bottomMargin); + setMargins(getLeftMargin(), topMargin, rightMargin, bottomMargin); } void setScrollBar(ScrollBar bar, int clientArea, int maximum, int margin) { int inactive = 1; @@ -10241,7 +10241,7 @@ public void setTopIndex(int topIndex) { */ public void setTopMargin (int topMargin) { checkWidget(); - setMargins(leftMargin, topMargin, rightMargin, bottomMargin); + setMargins(getLeftMargin(), topMargin, rightMargin, bottomMargin); } /** * Sets the top pixel offset. Do nothing if there is no text set. |