| Summary: | Layout issue with Link | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Gunnar Wagenknecht <gunnar> | ||||||||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||||||||
| Status: | RESOLVED WORKSFORME | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | ||||||||||||
| Version: | 1.5 | ||||||||||||
| Target Milestone: | --- | ||||||||||||
| Hardware: | All | ||||||||||||
| OS: | All | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Gunnar Wagenknecht
Browser: Chrome 18.0 on Windows 7 Created attachment 214516 [details]
screenshot #2
The issue is actually worse if a control is used below the Grid. That cuts off the link in half.
I agree that the padding should not break the vertical alignment between Label and Link. Apart from that, the second screenshot looks like a bug indeed. The 2px padding is hard codded in the Link.java (see Link#PADDING). Probably we have to make this padding themable too. But... I don't think that this padding is the problem as it is respected in the Link#computeSize method. Could you provide a snippet to reproduce the cut-off issue? This is insane. I can't produce a simple snippet that reproduces the issues. I did one producing the same widgets but it doesn't cut-off. I'll attach the HTML and continue looking for the diff. If you compare the generated HTML you'll see that computed sizes are different. The problematic one calculates a "div" height of 4px (which is wrong). Created attachment 214520 [details]
generated HTML of simple snippet (without the issue)
Created attachment 214521 [details]
generated HTML of original code (with the issue)
So I think I found the issue. It's related to when the text is actually set to the Link. This one is OK: - New Link - setText - some-parent.layout(true, true); This is not OK: - New Link - some-parent.layout(true, true); - setText Is this expected behavior? When working with SWT I'm used to simply call #setText and the layout is invalidated when needed. Gunnar, I'm really curious about the difference with SWT. Could you provide a snippet? I want to test it in both RAP and SWT. Hmm. As of this morning I'm unable to reproduce it. The simple snippet always worked. I added a workaround (manual call to #layout after setting text) yesterday. Today I removed the workaround and it still works. That is weird. Closing as WORKSFORME. Sorry. |