]> source.dussan.org Git - vaadin-framework.git/commitdiff
Set a style name for the layout slot and add overflow: hidden (#8313)
authorLeif Åstrand <leif@vaadin.com>
Thu, 16 Feb 2012 16:58:15 +0000 (18:58 +0200)
committerLeif Åstrand <leif@vaadin.com>
Thu, 16 Feb 2012 16:58:15 +0000 (18:58 +0200)
WebContent/VAADIN/themes/base/orderedlayout/orderedlayout.css
src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayoutPaintable.java
src/com/vaadin/terminal/gwt/client/ui/layout/VLayoutSlot.java
src/com/vaadin/terminal/gwt/client/ui/layout/VPaintableLayoutSlot.java

index ef8c15ac1e49ff482edb0b06830712898ab5bbc1..83fcc0b84f96e6cf4684426f638683478e2e98c1 100644 (file)
@@ -38,3 +38,8 @@
        padding-top: 0;
        padding-left: 0;
 }
+
+.v-horizontallayout-slot, .v-verticallayout-slot {
+       position: absolute;
+       overflow: hidden;
+}
index 0583be5ada9fcff45190e33fcc882f47cea10764..e142f31ffe57ddfa6dc53e312fd0fbbcd28bc3c6 100644 (file)
@@ -72,7 +72,8 @@ public abstract class VMeasuringOrderedLayoutPaintable extends
             VLayoutSlot slot = layout.getSlotForChild(widget);
 
             if (widget.getParent() != layout) {
-                slot = new VPaintableLayoutSlot(child);
+                slot = new VPaintableLayoutSlot(getWidgetForPaintable()
+                        .getStylePrimaryName(), child);
                 layout.addSlot(slot);
             }
 
index d14ab2b90e593b32f4cb095bcf7d40df8402c9a8..f5ec7826c3d0585086fda56e7017ab306086406d 100644 (file)
@@ -20,10 +20,10 @@ public abstract class VLayoutSlot {
 
     private double expandRatio;
 
-    public VLayoutSlot(Widget widget) {
+    public VLayoutSlot(String baseClassName, Widget widget) {
         this.widget = widget;
 
-        wrapper.getStyle().setPosition(Position.ABSOLUTE);
+        wrapper.setClassName(baseClassName + "-slot");
     }
 
     public VCaption getCaption() {
index 17afab0fe8f43517bc2f5d75e398f8f86053aac5..e309de7c4b9e5456ade32b0b84b96e6f8a412726 100644 (file)
@@ -8,8 +8,8 @@ public class VPaintableLayoutSlot extends VLayoutSlot {
 
     final VPaintableWidget paintable;
 
-    public VPaintableLayoutSlot(VPaintableWidget paintable) {
-        super(paintable.getWidgetForPaintable());
+    public VPaintableLayoutSlot(String baseClassName, VPaintableWidget paintable) {
+        super(baseClassName, paintable.getWidgetForPaintable());
         this.paintable = paintable;
     }