Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 361349

Summary: [Button] Text alignment does not work if SWT.WRAP is specified
Product: [RT] RAP Reporter: Sebastian Bauer <mail>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tbuschto
Version: unspecified   
Target Milestone: 1.5 M3   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Example none

Description Sebastian Bauer CLA 2011-10-19 04:00:52 EDT
Build Identifier: 

The attached example shows some oddities with wrappable Buttons, in which the wrapped lines are not centered individually.


Reproducible: Always
Comment 1 Sebastian Bauer CLA 2011-10-19 04:01:17 EDT
Created attachment 205482 [details]
Example
Comment 2 Ivan Furnadjiev CLA 2011-10-21 03:40:29 EDT
Sebastian, in your example you create a button with SWT.WRAP style flag only. In this case, the default text alignment is SWT.LEFT. Nevertheless, with SWT.CENTER style flag specified, it doesn't work too.
Comment 3 Sebastian Bauer CLA 2011-10-21 04:01:45 EDT
(In reply to comment #2)
> Sebastian, in your example you create a button with SWT.WRAP style flag only.
> In this case, the default text alignment is SWT.LEFT. Nevertheless, with
> SWT.CENTER style flag specified, it doesn't work too.

Yes, I tried SWT.CENTER as well and just forgot to attach the correct example.
Comment 4 Ivan Furnadjiev CLA 2011-10-21 04:10:03 EDT
(In reply to comment #2)
> ...the default text alignment is SWT.LEFT.
Please, discard this statement. If no align style flag is specified the Button#checkStyle add SWT.CENTER.
Comment 5 Tim Buschtoens CLA 2011-10-28 11:18:42 EDT
Fixed in CVS HEAD in MultiCellWidget.js (setting text-align css property)