]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed stuff related to BoxLayout
authorJouni Koivuviita <jouni@jounikoivuviita.com>
Thu, 19 Apr 2012 12:35:08 +0000 (15:35 +0300)
committerJouni Koivuviita <jouni@jounikoivuviita.com>
Thu, 19 Apr 2012 12:35:08 +0000 (15:35 +0300)
WebContent/VAADIN/themes/base/absolutelayout/absolutelayout.css
WebContent/VAADIN/themes/base/boxlayout/boxlayout.css
WebContent/VAADIN/themes/base/datefield/datefield.css
WebContent/VAADIN/themes/base/paintable/paintable.css
src/com/vaadin/terminal/gwt/client/ui/AbstractBoxLayoutConnector.java

index fba94a8edccbf72e0a4b43ca4bd84302ff3738f3..0d2f7312fb2c8280eb13a992e78be335961f64f0 100644 (file)
@@ -1,3 +1,15 @@
+/* THIS IS HERE ONLY BECAUSE WE WANT TO DEFINE IT FIRST, TO MAKE IT EASY TO OVERRIDE */
+.v-connector {
+       -webkit-box-sizing: border-box;
+       -moz-box-sizing: border-box;
+       box-sizing: border-box;
+       text-align: left;
+       display: inline-block;
+       white-space: normal;
+}
+
+/* Actual AbsoluteLayout styles begin here */
+
 .v-absolutelayout-wrapper {
        position: absolute;
        overflow: hidden;
index a16b85fc65c8438d6bfe892b5ef9752141ae13b9..3188d68520880b67dfe93faed43e1e30a2d7c9ae 100644 (file)
@@ -91,8 +91,6 @@ TODO
 .v-align-middle > .v-connector,
 .v-align-bottom > .v-connector {
        display: inline-block;
-       /* TODO this is a bit tricky, since it will override component defaults in some cases */
-       white-space: normal;
 }
 
 .v-align-middle > .v-connector {
@@ -152,8 +150,6 @@ TODO
 .v-caption-on-right > .v-connector {
        display: inline-block;
        vertical-align: middle;
-       /* TODO this is a bit tricky, since it will override component defaults in some cases */
-       white-space: normal;
 }
 
 .v-has-caption.v-has-width > .v-connector {
index 7af440c735bdd436e7d5a1c95e15f6601a1b4acb..71b9ad07a5ff6f01c5f460ec6ed670a5b830ae9e 100644 (file)
@@ -1,6 +1,6 @@
 .v-datefield {
        white-space: nowrap;
-       float: left; /* Force minimum width */
+       display: inline-block; /* Force minimum width */
 }
 .v-datefield-textfield {
        vertical-align: top;
index 9d700fd4ee6db4cbed30f64af6c911efc53d2770..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,7 +0,0 @@
-.v-connector {
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing: border-box;
-       box-sizing: border-box;
-       text-align: left;
-       display: inline-block;
-}
index b88c700e0455a4d8c2d2aa611395d1e4c26d4527..546c89b33061b08a3e940156bf366e7fb0d17d45 100644 (file)
@@ -225,6 +225,8 @@ public abstract class AbstractBoxLayoutConnector extends
         if (!slot.hasCaption()) {
             childCaptionElementHeight.remove(child.getWidget().getElement());
         }
+
+        updateLayoutHeight();
     }
 
     @Override
@@ -401,14 +403,17 @@ public abstract class AbstractBoxLayoutConnector extends
                 childElementHeight.put(el, getLayoutManager()
                         .getOuterHeight(el));
 
-                // Element captionElement = el.getParentElement()
-                // .getFirstChildElement().cast();
-                // if (captionElement.getClassName().contains("v-caption")) {
-                // childCaptionElementHeight.put(el, getLayoutManager()
-                // .getOuterHeight(captionElement));
-                // }
+                Element captionElement = el.getParentElement()
+                        .getFirstChildElement().cast();
+                if (captionElement.getClassName().contains("v-caption")) {
+                    childCaptionElementHeight.put(el, getLayoutManager()
+                            .getOuterHeight(captionElement));
+                }
             }
 
+            // If no height has been set, use the natural height for the
+            // component (this is mostly just a precaution so that something
+            // renders correctly)
             String h = getWidget().getElement().getStyle().getHeight();
             if (h == null || h.equals("")) {
                 int height = getLayoutManager().getOuterHeight(