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 103028 Details for
Bug 234998
[Forms] FormText calculates width inappropiately when using <br/>
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]
patch which resets the width when a <br/> is encountered
patch.txt (text/plain), 1.78 KB, created by
Thomas Schindl
on 2008-05-31 15:42:39 EDT
(
hide
)
Description:
patch which resets the width when a <br/> is encountered
Filename:
MIME Type:
Creator:
Thomas Schindl
Created:
2008-05-31 15:42:39 EDT
Size:
1.78 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.forms >Index: src/org/eclipse/ui/forms/widgets/FormText.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormText.java,v >retrieving revision 1.80 >diff -u -r1.80 FormText.java >--- src/org/eclipse/ui/forms/widgets/FormText.java 14 Apr 2008 20:07:49 -0000 1.80 >+++ src/org/eclipse/ui/forms/widgets/FormText.java 31 May 2008 19:37:45 -0000 >@@ -63,6 +63,7 @@ > import org.eclipse.ui.forms.events.HyperlinkEvent; > import org.eclipse.ui.forms.events.IHyperlinkListener; > import org.eclipse.ui.internal.forms.Messages; >+import org.eclipse.ui.internal.forms.widgets.BreakSegment; > import org.eclipse.ui.internal.forms.widgets.ControlSegment; > import org.eclipse.ui.internal.forms.widgets.FormFonts; > import org.eclipse.ui.internal.forms.widgets.FormTextModel; >@@ -278,8 +279,15 @@ > if (segments.length > 0) { > selectableInTheLastRow = false; > int pwidth = 0; >+ int currentMax = 0; > for (int j = 0; j < segments.length; j++) { > ParagraphSegment segment = segments[j]; >+ >+ if( segment instanceof BreakSegment ) { >+ currentMax = Math.max(currentMax, pwidth); >+ pwidth = 0; >+ } >+ > segment.advanceLocator(gc, wHint, loc, resourceTable, > false); > if (wHint != SWT.DEFAULT) { >@@ -290,13 +298,16 @@ > if (segment instanceof IFocusSelectable) > selectableInTheLastRow = true; > } >+ > if (wHint == SWT.DEFAULT) >- width = Math.max(width, pwidth); >+ width = Math.max(width, Math.max(currentMax, pwidth)); >+ > loc.y += loc.rowHeight; > } else { > // empty new line > loc.y += lineHeight; > } >+ > } > gc.dispose(); > if (selectableInTheLastRow)
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 234998
: 103028