| Summary: | AbstractTable: Cell icon not considered when wrapping text | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Beat Schwarzentrub <bsh> | ||||||||||||
| Component: | Scout | Assignee: | Project Inbox <scout.core-inbox> | ||||||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||||||
| Severity: | minor | ||||||||||||||
| Priority: | P3 | CC: | steiner.ralph, zimmermann | ||||||||||||
| Version: | unspecified | Flags: | andi.bur:
juno+
|
||||||||||||
| Target Milestone: | --- | ||||||||||||||
| Hardware: | PC | ||||||||||||||
| OS: | Windows XP | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Attachments: |
|
||||||||||||||
Created attachment 201063 [details]
Example.java
Created attachment 201064 [details]
TestTable_NOK.png
Created attachment 201065 [details]
TestTable_OK.png
Created attachment 210736 [details]
Proposed Patch
I've found the bug. I had the same problem in a diffrent context. With this patch, all worked fine. I've not tested the patch against the example provided by Beat Schwarzentrub.
As one can see in the patch, the bug and its fix is obvious. (iconR.width would be always '0'. The developer had the 'icon' variable in mind not the 'iconR')
Created attachment 210776 [details]
Test Table with the patch applied
I have tested now the patch against the test table code from Beat Schwarzentrub. I have created a new empty project and added an empty form with this test table. The attached picture shows the correct behavior with the patch. Test was done on the scout trunk.
Reviewed and applied patch on Scout branches 3.8 and 3.9. Beat, Ralph: Thanks for your contribution. shipped with scout juno sr1 |
Build Identifier: 3.7.0.2011-Jun 2011 PROBLEM DESCRIPTION: When a column has getConfiguredTextWrap() = true, the text is broken up in multiple lines and the row's height is adjusted so that the full text is visible. However, the algorithm that adjusts the row's height does not seem to consider cell icons. It is possible that the text is wrapped, but the row's height is not adjusted. In the attached example, the word "IMPORTANT" cannot be seen ("NOK"). When the column width is decreased about the width of the icon, the wrapping is correct ("OK"). EVALUATION: - PROPOSED SOLUTION: - Reproducible: Always