Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 271277 - [Tree] labels of following columns misplaced when showing an image in a column
Summary: [Tree] labels of following columns misplaced when showing an image in a column
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.2   Edit
Hardware: All All
: P1 normal (vote)
Target Milestone: 1.2 M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-06 02:29 EDT by Björn Fischer CLA
Modified: 2009-04-17 07:40 EDT (History)
2 users (show)

See Also:


Attachments
Project with sample code showing the bug (17.71 KB, application/zip)
2009-04-06 02:29 EDT, Björn Fischer CLA
no flags Details
Screenshot showing the displaced labels when images are existent (8.50 KB, image/png)
2009-04-06 02:45 EDT, Björn Fischer CLA
no flags Details
Fix for the image alignment (4.39 KB, patch)
2009-04-08 17:38 EDT, Austin Riddle CLA
no flags Details | Diff
Fix for the image alignment that is compatible with CVS HEAD (3.50 KB, patch)
2009-04-08 17:42 EDT, Austin Riddle CLA
no flags Details | Diff
Fix for the image alignment (3.69 KB, patch)
2009-04-08 18:02 EDT, Austin Riddle CLA
ruediger.herrmann: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Fischer CLA 2009-04-06 02:29:59 EDT
Created attachment 130959 [details]
Project with sample code showing the bug

Build ID: 1.2.0-M6-20090319-1159

Steps to reproduce:
1. Create a tree viewer
2. Add a few columns
3. Add column label providers
4. For the first label provider, return an Image in the getImage() method, but not for all items, just for some.
5. For one of the following label providers (not the last one), return an Image in the getImage() method.
Comment 1 Björn Fischer CLA 2009-04-06 02:42:19 EDT
Following the steps above shows two different problems:

1. in the first column (the actual tree column) the image is vertically aligned with the labels of the non-imaged items. This is a difference to RCP since the RCP TreeViewer holds images in an own "fake column" so that all labels - regardless of the image in front them - become vertically aligned.

2. showing an image in an inner column (not the first and not the last one) results in displaced labels of the following columns. The attached screenshot illustrates the problem which can be reproduced with the attached sample project.
Comment 2 Björn Fischer CLA 2009-04-06 02:45:51 EDT
Created attachment 130961 [details]
Screenshot showing the displaced labels when images are existent
Comment 3 Austin Riddle CLA 2009-04-08 17:38:57 EDT
Created attachment 131343 [details]
Fix for the image alignment

This patch fixes the aforementioned problem, plus one more.
There is now appropriate space between the icon and label of the first column as well.
Comment 4 Austin Riddle CLA 2009-04-08 17:42:34 EDT
Created attachment 131344 [details]
Fix for the image alignment that is compatible with CVS HEAD

Sorry, wasn't up to date yet, when I made the previous patch.
Comment 5 Austin Riddle CLA 2009-04-08 18:02:00 EDT
Created attachment 131346 [details]
Fix for the image alignment

The previous patch did not work properly for the checkbox tree. This one does.
Comment 6 Ivan Furnadjiev CLA 2009-04-14 09:11:57 EDT
Austin, thank you for the patch. It is applied in the CVS HEAD with small modifications.