]> source.dussan.org Git - vaadin-framework.git/commitdiff
Use margins on the default Root layout
authorLeif Åstrand <leif@vaadin.com>
Fri, 18 Nov 2011 11:20:07 +0000 (13:20 +0200)
committerLeif Åstrand <leif@vaadin.com>
Fri, 18 Nov 2011 11:20:07 +0000 (13:20 +0200)
src/com/vaadin/ui/Root.java

index 0dd6620b20ceef237852dca3bba33cb3faf9b48d..7805217b3d6744883e40a47c4fce93295ddab188 100644 (file)
@@ -503,11 +503,17 @@ public class Root extends AbstractComponentContainer {
 
     public ComponentContainer getContent() {
         if (content == null) {
-            setContent(new VerticalLayout());
+            setContent(createDefaultLayout());
         }
         return content;
     }
 
+    private VerticalLayout createDefaultLayout() {
+        VerticalLayout layout = new VerticalLayout();
+        layout.setMargin(true);
+        return layout;
+    }
+
     public void setContent(ComponentContainer content) {
         if (this.content != null) {
             super.removeComponent(content);