| Summary: | [Table][Tree] Setting vertical alignment | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Stephan Leicht Vogt <stephan.leichtvogt> | ||||||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||||||
| Status: | NEW --- | QA Contact: | |||||||||
| Severity: | enhancement | ||||||||||
| Priority: | P3 | CC: | claudio.guglielmo, ivan, michael.weiner, micromms | ||||||||
| Version: | 1.5 | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Stephan Leicht Vogt
Created attachment 205803 [details]
Fix for enhancement on Table and Tree
Created attachment 217431 [details]
Correction of last patch
this patch works with current git-head. (after tree->grid change)
The actual reason, why we would like to control the vertical alignment, is the following line in GridRow.js: element.style.lineHeight = config.markupEnabled ? "" : element.style.height; By default, the text is aligned middle. In case of html markup, it's aligned top. This leads to following problem: When using simple html like <b>my content</b> with the default row height, it looks quite ugly, especially if an icon is set too. See attached screenshot. In case of multiline text with custom row height, it looks fine, apart from the icon which still is aligned middle. So in my opinion setting the lineHeight should not depend on whether there is html markup or not, but rather on whether there is multiline text or not. Additionally the icon should be considered as well. If that was the case, an additional vertical alignment property would not be necessary for us. Created attachment 226926 [details]
Screenshot with misaligned text in tree
(In reply to comment #4) > Created attachment 226926 [details] > Screenshot with misaligned text in tree With the fix for bug 373652 the top cell padding is applied on the item text regardless if markup is enabled or not. This should fix the issue shown on the screenshot and the need for setting the vertical alignment is not important anymore. Claudio, could you confirm this? The fix for bug 373652 solved the vertical alignment issue with the text, thank you for that! However, the image still is centered. Would it be possible to position the image centrally to the height of the first line instead of centrally to the whole cell? This should not change the single line behaviour but makes it look better in case of multi line. (In reply to comment #6) > The fix for bug 373652 solved the vertical alignment issue with the text, > thank you for that! > > However, the image still is centered. Would it be possible to position the > image centrally to the height of the first line instead of centrally to the > whole cell? This should not change the single line behaviour but makes it > look better in case of multi line. The image is center aligned in the cell because: 1. Nebula Grid behaves the same in case of milti-line text (we are using the same client-side implementation for RAP Nebula Grid port). 2. Looks better in case of columns with chekboxes. *** Bug 474715 has been marked as a duplicate of this bug. *** Is it possible to calculate the value of the CSS top based on the value of the custom_item_height? |