Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 298679
Collapse All | Expand All

(-)a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java (-4 / +4 lines)
Lines 8408-8414 Link Here
8408
 */
8408
 */
8409
public void setBottomMargin (int bottomMargin) {
8409
public void setBottomMargin (int bottomMargin) {
8410
	checkWidget();
8410
	checkWidget();
8411
	setMargins(leftMargin, topMargin, rightMargin, bottomMargin);
8411
	setMargins(getLeftMargin(), topMargin, rightMargin, bottomMargin);
8412
}
8412
}
8413
/**
8413
/**
8414
 * Moves the Caret to the current caret offset.
8414
 * Moves the Caret to the current caret offset.
Lines 9268-9274 Link Here
9268
 */
9268
 */
9269
public void setMargins (int leftMargin, int topMargin, int rightMargin, int bottomMargin) {
9269
public void setMargins (int leftMargin, int topMargin, int rightMargin, int bottomMargin) {
9270
	checkWidget();
9270
	checkWidget();
9271
	this.leftMargin = Math.max(0, leftMargin);
9271
	this.leftMargin = Math.max(0, leftMargin) + alignmentMargin;
9272
	this.topMargin = Math.max(0, topMargin);
9272
	this.topMargin = Math.max(0, topMargin);
9273
	this.rightMargin = Math.max(0, rightMargin);
9273
	this.rightMargin = Math.max(0, rightMargin);
9274
	this.bottomMargin = Math.max(0, bottomMargin);
9274
	this.bottomMargin = Math.max(0, bottomMargin);
Lines 9329-9335 Link Here
9329
 */
9329
 */
9330
public void setRightMargin (int rightMargin) {
9330
public void setRightMargin (int rightMargin) {
9331
	checkWidget();
9331
	checkWidget();
9332
	setMargins(leftMargin, topMargin, rightMargin, bottomMargin);
9332
	setMargins(getLeftMargin(), topMargin, rightMargin, bottomMargin);
9333
}
9333
}
9334
void setScrollBar(ScrollBar bar, int clientArea, int maximum, int margin) {
9334
void setScrollBar(ScrollBar bar, int clientArea, int maximum, int margin) {
9335
	int inactive = 1;
9335
	int inactive = 1;
Lines 10015-10021 Link Here
10015
 */
10015
 */
10016
public void setTopMargin (int topMargin) {
10016
public void setTopMargin (int topMargin) {
10017
	checkWidget();
10017
	checkWidget();
10018
	setMargins(leftMargin, topMargin, rightMargin, bottomMargin);
10018
	setMargins(getLeftMargin(), topMargin, rightMargin, bottomMargin);
10019
}
10019
}
10020
/**
10020
/**
10021
 * Sets the top pixel offset. Do nothing if there is no text set.
10021
 * Sets the top pixel offset. Do nothing if there is no text set.

Return to bug 298679