diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-04-17 15:04:43 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-04-17 15:04:43 +0300 |
commit | 025dbd6e6de9b1c97384d5498429c4d3d0554746 (patch) | |
tree | 37f3c0958845e1aa6188f73d4131aedc252077e6 | |
parent | 4d2b5c2ab1ddf5194458270807d4cc476618ef76 (diff) | |
download | vaadin-framework-025dbd6e6de9b1c97384d5498429c4d3d0554746.tar.gz vaadin-framework-025dbd6e6de9b1c97384d5498429c4d3d0554746.zip |
Put margin on caption's parent so caption's outer size can be used
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/panel/PanelConnector.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/panel/PanelConnector.java b/src/com/vaadin/terminal/gwt/client/ui/panel/PanelConnector.java index 32cf9cfb2e..a8512762f1 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/panel/PanelConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/panel/PanelConnector.java @@ -185,11 +185,12 @@ public class PanelConnector extends AbstractComponentContainerConnector VPanel panel = getWidget(); LayoutManager layoutManager = getLayoutManager(); - int top = layoutManager.getInnerHeight(panel.captionNode); + int top = layoutManager.getOuterHeight(panel.captionNode); int bottom = layoutManager.getInnerHeight(panel.bottomDecoration); Style style = panel.getElement().getStyle(); - panel.captionNode.getStyle().setMarginTop(-top, Unit.PX); + panel.captionNode.getParentElement().getStyle() + .setMarginTop(-top, Unit.PX); panel.bottomDecoration.getStyle().setMarginBottom(-bottom, Unit.PX); style.setPaddingTop(top, Unit.PX); style.setPaddingBottom(bottom, Unit.PX); |