| Summary: | StyledText handling of indent of single line is broken. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Doug M <eclipse> | ||||
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | Niraj Modi <niraj.modi> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | lshanmug, Silenio_Quarti | ||||
| Version: | 4.2 | Keywords: | triaged | ||||
| Target Milestone: | --- | ||||||
| Hardware: | Macintosh | ||||||
| OS: | Mac OS X | ||||||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=508600 | ||||||
| Whiteboard: | stalebug | ||||||
| Attachments: |
|
||||||
There is a bug report and patch to add new API to get average char width in float - Bug 508600. Using the new API could fix the issue. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Created attachment 220231 [details] Demonstrates two bugs with indent. Two bugs that appear when an indent is set on a single line (SWT.SINGLE or SWT.MULTI): 1) When an indent is set for a single line , computeSize fails to take into account the indent when computing the preferred size. This error can be corrected by increasing the returned size by the indent. 2) A modify listener resizes the text area after typing. Indent is set to 3 characters. Indent starts out correct. Type a character at the end of the text area. The text area is correctly resized in the modify listener. However, when next displayed, the indent becomes 5 characters, and text is shifted to the right, out of the visible area. Typing in the middle of the text occasionally works correctly. In general, when something is typed at the end it seems to add to the indent double the specified indent minus one character width. There is a sloppy workaround: set the same contents back to the text area after resizing.