diff options
author | Leif Åstrand <leif@vaadin.com> | 2011-09-07 10:16:25 +0000 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2011-09-07 10:16:25 +0000 |
commit | f65e90d979d1ebacbef35d058b0bbf8e0349d0e3 (patch) | |
tree | f56fc04c777906418099bc93bebfab049abd3ac0 /src/com/vaadin | |
parent | 841e99e80fc6edd9059c66e5fee72c7e11c21b05 (diff) | |
download | vaadin-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.java | 9 |
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(); } |