Community
Participate
Working Groups
Build Identifier: 20110615-0604 We're developing a RAP application with CSS themeing and some complex layouts. A strange behavior occurs: Some labels are ALWAYS cut off (e.g. "Nan" instead of "Name"). This happens on multiple platforms and multiple Browsers (Windows 7 with current versions of IE, Firefox and Chrome, iPad 2 with Safari). Only Ubuntu with Firefox did not have the problem. We contacted Ralf Sternberg and he also did not have that issue when running the sample project. The strange thing is: The label is only cut off the first time. If you reload the page, everything is alright. But we also had the problem that some labels were always rendered too short. Attached is a screenshot and a sample. We believe that something is wrong in RAP when labels are inside a component which has a width hint and which is in a StackLayout. Reproducible: Always Steps to Reproduce: 1. Import project 2. Set target platform 3. Run as RAP application Note: If you want to reproduce the problem again, you must restart the RAP application!!!
Created attachment 202089 [details] Here's a screenshot which shows the cut off label
Created attachment 202090 [details] And he're the associated demo project
I can reproduce it with RAP 1.4 and CVS HEAD.
This issue is related to width hint only. In case of width hint, the size of the Composite is not changed during the TextSizeDetermination "enlargement", thus the layout is not performed on it. I remember such a bug already opened, but I can't find it anymore.
The problem is in the Composite#notifyResize. In the original SWT Composite#sendResize method there is no check for a different size. Removing this check fixes the problem and there is no failing tests. I'll try to come with a JUnit test for it.
(In reply to comment #5) > In the original SWT Composite#sendResize method there is no check for a different size. I was wrong - the check for different size is done in Composite#setBounds ( if (wasResized && !isDisposed ()) sendResize (); )
Created attachment 202170 [details] Proposed patch for v14_Maintenance branch
Applied patch to CVS HEAD. Fixed by marked composite layout for recalculation in TextSizeRecalculation.
Comment on attachment 202170 [details] Proposed patch for v14_Maintenance branch Looks all right to me. +1 to apply this patch to the 1.4 maintenance branch.
Applied patch to v14_Maintenance branch.
Applied patch to Tree_Table_Merge branch too.
We checked out the nightly build and ran out app with it. The issue really seems to be solved. We're looking forward to the 1.4.1 release. Thanks a lot. PS: Did you have to change the plugin.xml? The <themeContribution> doesn't work anymore in out project (theme id could not be found). We changed to a normal <theme> to try it out.
(In reply to comment #12) > PS: Did you have to change the plugin.xml? The <themeContribution> doesn't work > anymore in out project (theme id could not be found). We changed to a normal > <theme> to try it out. I opened a Bug 355723 for the theme contribution issue.