Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369470 - [Tree] Right Tree-Cell padding ignored when text is aligned to the right
Summary: [Tree] Right Tree-Cell padding ignored when text is aligned to the right
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-24 00:19 EST by Austin Riddle CLA
Modified: 2012-02-09 17:44 EST (History)
1 user (show)

See Also:


Attachments
Patch to add proper padding (710 bytes, patch)
2012-02-07 18:38 EST, Austin Riddle CLA
no flags Details | Diff
Patch that fixes the issue and updates test cases (2.07 KB, patch)
2012-02-09 17:38 EST, Austin Riddle CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Austin Riddle CLA 2012-01-24 00:19:04 EST
Reproducible in CVS HEAD with Controls Demo.

Go to the Tree Tab.
Check "linesVisible" 
Click "Change Columns Alignment"

Notice that the right justified column's text has no padding between the line and the end of the text.
Comment 1 Austin Riddle CLA 2012-02-02 14:10:12 EST
I am not sure if this is how it is supposed to be, but if you shrink a column to smaller than the cell data, then there is also a lack of padding between the right end of the cell content and the column line. I don't recall this being the case in previous versions, but I do know for a fact that there was right cell padding when the content was right justified.
Comment 2 Austin Riddle CLA 2012-02-07 18:38:27 EST
Created attachment 210700 [details]
Patch to add proper padding

This solves the right padding issue. I am not sure if the adapter or the LCA is the correct place for the fix.
Comment 3 Tim Buschtoens CLA 2012-02-09 06:34:42 EST
I *think* inside getTextWidth would be better, TreeItem#getTextBounds might be depend on it. Anyway the patch is currently breaking tests, fix those first.
Comment 4 Austin Riddle CLA 2012-02-09 17:38:26 EST
Created attachment 210830 [details]
Patch that fixes the issue and updates test cases
Comment 5 Austin Riddle CLA 2012-02-09 17:44:11 EST
Patch applied to CVS HEAD.