Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 225161 Details for
Bug 298679
StyledText center and right alignment is wrong after setting its left margin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed patch
master.patch (text/plain), 1.73 KB, created by
Alexander Zakusylo
on 2013-01-03 02:38:05 EST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Alexander Zakusylo
Created:
2013-01-03 02:38:05 EST
Size:
1.73 KB
patch
obsolete
>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 1763971..ea7fc91 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 >@@ -8408,7 +8408,7 @@ > */ > public void setBottomMargin (int bottomMargin) { > checkWidget(); >- setMargins(leftMargin, topMargin, rightMargin, bottomMargin); >+ setMargins(getLeftMargin(), topMargin, rightMargin, bottomMargin); > } > /** > * Moves the Caret to the current caret offset. >@@ -9268,7 +9268,7 @@ > */ > 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); >@@ -9329,7 +9329,7 @@ > */ > 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; >@@ -10015,7 +10015,7 @@ > */ > 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.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 298679
:
155153
| 225161