| Summary: | [CellEditors] combo cell editor pops up in unexpected location in task view column | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Susan McCourt <susan> | ||||||||||||
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> | ||||||||||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||||||||||
| Severity: | minor | ||||||||||||||
| Priority: | P3 | CC: | gunnar, krzysztof.michalski, Mike_Wilson, Tod_Creasey | ||||||||||||
| Version: | 3.1 | Keywords: | helpwanted | ||||||||||||
| Target Milestone: | --- | ||||||||||||||
| Hardware: | PC | ||||||||||||||
| OS: | Windows XP | ||||||||||||||
| Whiteboard: | stalebug | ||||||||||||||
| Attachments: |
|
||||||||||||||
This is a function of the 'computeBounds' method in the TableEditor class. It (likely intentionally) offsets the bounds to 'skip' the image. My guess is that this is to support 'imaged' labels, where the edit control should indeed show up bounded only by the text area. We might hack around this by supplying a fully transparent 'image' for the 'normal' state...making it the same as the other two states that already have images. Instead of the transparent image for the normal state, we can show editor always as in the normal state. I think that we can cover the image with the editor for high and low state. Created attachment 41441 [details]
My cell editor ...
I think it is good idea to separate view mode and edit mode of the cell.
Here you have a screenshot how it can look like.
To achieve this we have to modify computeBounds() method in TreeEditor.
Rectangle computeBounds () {
if (item == null || column == -1 || item.isDisposed())
return new Rectangle(0, 0, 0, 0);
Rectangle cell = item.getBounds(column);
Rectangle rect = item.getImageBounds(column);
(-) cell.x = rect.x + rect.width;
(-) cell.width -= rect.width;
Rectangle area = tree.getClientArea();
(In reply to comment #3) > Created an attachment (id=41441) [edit] I can't view the attachment. I think the content type is wrong. Created attachment 41442 [details]
Attachment again
Created attachment 41579 [details]
Patch for the cell editor
Comment on attachment 41579 [details]
Patch for the cell editor
This is change in the swt TreeEditor, so maybe it will be easier to add this transparent image ;-)
Szymon, I think that you're correct in determining that changing the SWT behaviour is not the way to go. We are being inconsistent in how we define the 'cell' (low/high have images and 'normal' doesn't) which is giving us inconsistent behaviour in the GUI. If you want to go the 'blank icon' route remember to make it fully 'transparent', not a block of a particular color so that it'll work on all colour schemes/themes... Created attachment 41598 [details]
Icon for the normal state
Finally I added icon for the normal priority.
If we want to have the same behaviour for all priorities,
that normal icon should be introduced. The graphic team
should prepare a nice icon...
Comment on attachment 41598 [details]
Icon for the normal state
I removed try/catch statement from the getImage method because it is no longer necessary. I included it in the patch as well.
Created attachment 41719 [details]
Screen cap showing small priority icons
I'm not sure what's changed but this is what I get on my machine
I apply this patch and everything seems ok. I have a normal size of icon. Szymon, I've just tried this again with RC5 and it works fine for me now. I'll mark this for 3.3 (and start the process going to get a 'real' icon...;-). Thanks Tod, can you open a request in the image database for the icon? Thanks dude. Eric where would this image live? The same place as the current 'high' and 'low' priority icons...see 'FieldPriority'... Too much on my plate...;-(. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
3.1 RC1, Windows XP - open the tasks view - click in the priority column (the second column) to change the priority of a "normal" (blank in the column) task - the combo cell editor overlays the column when the column is empty problem 1: this is somewhat distracting/disconcerting - change the value to "high" and click on another task - the cell now has the high prio icon in it - click on the cell again to edit it. - now the combo cell editor is displayed to the right of the column problem 2: this is inconsistent with the behavior when the column is empty It seems to treat the empty column specially, but the fact that the column is empty is as meaningful as it having an icon, so I would expect the combo cell editor to pop up to the right of the column in both cases.