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

Bug 303923

Summary: [Table] Wrong position of cell's text if no image is in cell
Product: [RT] RAP Reporter: Markus Krüger <webmaster>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 1.3   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Table showing the wrong position
none
Table with images on SWT/Win32
none
Table showing the better position in RCP
none
Snippet View none

Description Markus Krüger CLA 2010-02-25 10:54:30 EST
Created attachment 160196 [details]
Table showing the wrong position

I'm using a ColumnLabelProvider to populate tables cells with text and icons.
In RAP ther is a difference in apperance to RCP.
If you have a column where a cell can contain an image or text and you have at least one row with an image, then the text of cells with no image is shifted to the right by the width of the image. In RCP the text is fully aligned to the left.
In RAP this looks quite bad, see my screenshot.

P.s.: I'm using CVS HEAD.
Comment 1 Rüdiger Herrmann CLA 2010-02-25 15:05:55 EST
Created attachment 160230 [details]
Table with images on SWT/Win32
Comment 2 Rüdiger Herrmann CLA 2010-02-25 15:06:26 EST
This is intended. SWT looks the same (see attached screenshot).
Comment 3 Markus Krüger CLA 2010-02-26 05:25:37 EST
Hmmm,
maybe its some jface stuff, but in my rcp the table looks like the new attachment in RCP.
The dialog showing the table is single sourced, so it is the exact same code for RCP and RAP I use.
I will create a snippe for you.
Comment 4 Markus Krüger CLA 2010-02-26 05:26:12 EST
Created attachment 160280 [details]
Table showing the better position in RCP
Comment 5 Markus Krüger CLA 2010-02-26 05:52:57 EST
Created attachment 160282 [details]
Snippet View

Here is the code I use, different behavior in RCP and RAP.
It seems that RCP only shifts the text to the right in the first column of the table. That is why your attached image doesn't show the problem.
Use the attached view to see the difference between RCP and RAP.
Comment 6 Rüdiger Herrmann CLA 2010-03-01 13:12:08 EST
(In reply to comment #5)
> Created an attachment (id=160282)
> Snippet View
> 
> Here is the code I use, different behavior in RCP and RAP.
> It seems that RCP only shifts the text to the right in the first column of the
> table. That is why your attached image doesn't show the problem.
> Use the attached view to see the difference between RCP and RAP.
You are right, but I am afraid, there is currently noone who could improve that.
(BTW, from my POV, RAP is at least consitent;)
Comment 7 Markus Krüger CLA 2010-03-02 00:22:53 EST
"BTW, from my POV, RAP is at least consitent;" <- That's true.

In my eyes the programmer shoudl decide how this should be displayed anyway.