| Summary: | [Table] Column icons misaligned when tableviewer scrolled and refreshed | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Austin Riddle <austin.riddle> | ||||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | ||||||||
| Version: | 1.3 | ||||||||
| Target Milestone: | 1.3 M7 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
It seems like the icons are offset to the left by the amount that the scrollbar is scrolled to the right. Created attachment 165688 [details]
Updated sample project to show background color misalignment
After more testing, the problem also applies to custom column background colors. See the label provider in TableView.java for details.
We need to add the leftOffset back to the item bounds, imageBounds and textBounds before writing them to the client, as leftOffset shifts the complete TableRow on the client. Apart of that, now TableItem#getTextBounds() now uses TableItem#getLeft() too like in TableItem#getBounds() and TableItem#getImageBounds(). |
Created attachment 165686 [details] Sample project illustrating problem Version: CVS HEAD Steps to reproduce: 1) Create a tableviewer that has many columns and horizontal scrollbars 2) Provide at least one column that shows an icon 3) Create a way to toggle between an empty table and one with at least a few rows of data 4) Run app, and resize shell to ensure horizontal scrollbar is present. 5) Scroll to the right 6) Toggle the data "on". 7) Scroll to the left and observe the misaligned icons. -----OR------ Use the sample project provided and follow steps 4-7 above. TableView.java is the compilation unit of interest. Implications: This issue becomes evident when using a master/detail arrangement of views. If the content of the table is cleared or filled-in based on workbench selection (i.e., detail view) and the user has the viewer scrolled, this ugly problem manifests.