aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2011-09-07 10:16:25 +0000
committerLeif Åstrand <leif@vaadin.com>2011-09-07 10:16:25 +0000
commitf65e90d979d1ebacbef35d058b0bbf8e0349d0e3 (patch)
treef56fc04c777906418099bc93bebfab049abd3ac0 /src/com/vaadin
parent841e99e80fc6edd9059c66e5fee72c7e11c21b05 (diff)
downloadvaadin-framework-f65e90d979d1ebacbef35d058b0bbf8e0349d0e3.tar.gz
vaadin-framework-f65e90d979d1ebacbef35d058b0bbf8e0349d0e3.zip
#7326 Width recalculation does not work for GridLayout inside CustomComponent
svn changeset:20901/svn branch:6.7
Diffstat (limited to 'src/com/vaadin')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VCustomComponent.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VCustomComponent.java b/src/com/vaadin/terminal/gwt/client/ui/VCustomComponent.java
index 35ed2c5fed..a95f399855 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VCustomComponent.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VCustomComponent.java
@@ -123,6 +123,15 @@ public class VCustomComponent extends SimplePanel implements Container {
}
public boolean requestLayout(Set<Paintable> child) {
+ // If a child grows in size, it will not necessarily be calculated
+ // correctly unless we remove previous size definitions
+ if (isDynamicWidth()) {
+ getElement().getStyle().setProperty("width", "");
+ }
+ if (isDynamicHeight()) {
+ getElement().getStyle().setProperty("width", "");
+ }
+
return !updateDynamicSize();
}