From: Artur Signell Date: Thu, 29 Nov 2012 18:31:02 +0000 (+0200) Subject: Additional fixes for accordion/IE (#9552) X-Git-Tag: 7.0.0.beta11~57 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fchanges%2F67%2F467%2F4;p=vaadin-framework.git Additional fixes for accordion/IE (#9552) Fixes Accordion for other themes than Reindeer aswell Change-Id: If849e77adfb07e6a14784139c19e45b3b35a43b9 --- diff --git a/WebContent/VAADIN/themes/base/accordion/accordion.scss b/WebContent/VAADIN/themes/base/accordion/accordion.scss index 833060ade8..65906d491f 100644 --- a/WebContent/VAADIN/themes/base/accordion/accordion.scss +++ b/WebContent/VAADIN/themes/base/accordion/accordion.scss @@ -8,7 +8,8 @@ } .v-accordion-item { position: relative; - zoom: 1; + display: inline-block; + width: 100%; } .v-accordion-item-caption { overflow: visible; diff --git a/WebContent/VAADIN/themes/reindeer/accordion/accordion.scss b/WebContent/VAADIN/themes/reindeer/accordion/accordion.scss index bc332dd13b..c6ffaa4823 100644 --- a/WebContent/VAADIN/themes/reindeer/accordion/accordion.scss +++ b/WebContent/VAADIN/themes/reindeer/accordion/accordion.scss @@ -5,12 +5,9 @@ border-radius: 2px; -webkit-border-radius: 2px; -moz-border-radius: 2px; - overflow: visible; } .#{$primaryStyleName}-item { background-color: #fff; - display: inline-block; - width: 100%; } .#{$primaryStyleName}-item-caption { height: 19px; @@ -30,7 +27,7 @@ border-top: none; } .#{$primaryStyleName}-item-caption .v-caption { - padding: 3px 0 0px 10px; + padding: 3px 0 3px 10px; } .#{$primaryStyleName}-item-open .#{$primaryStyleName}-item-caption { background-image: url(../tabsheet/img/tabbar-bg-sel.png); /** sprite-ref: verticals; sprite-alignment: repeat */ diff --git a/WebContent/VAADIN/themes/runo/accordion/accordion.scss b/WebContent/VAADIN/themes/runo/accordion/accordion.scss index deeb494371..f85a1dadab 100644 --- a/WebContent/VAADIN/themes/runo/accordion/accordion.scss +++ b/WebContent/VAADIN/themes/runo/accordion/accordion.scss @@ -9,8 +9,8 @@ border-top: 1px solid #c8cccd; } .#{$primaryStyleName}-item-caption .v-caption { - padding: 7px 0 6px 31px; - background: transparent url(img/collapsed-icon.png) no-repeat 18px 50%; + padding: 7px 0 4px 31px; + background: transparent url(img/collapsed-icon.png) no-repeat 18px 55%; } .#{$primaryStyleName}-item-open .#{$primaryStyleName}-item-caption { color: #3b4b57; @@ -20,7 +20,7 @@ } .#{$primaryStyleName}-item-open .#{$primaryStyleName}-item-caption .v-caption { background-image: url(img/expanded-icon.png); - background-position: 17px 50%; + background-position: 17px 55%; } .#{$primaryStyleName}-item-first .#{$primaryStyleName}-item-caption { border-top: none; diff --git a/client/src/com/vaadin/client/ui/accordion/AccordionConnector.java b/client/src/com/vaadin/client/ui/accordion/AccordionConnector.java index 99e4ec0ffd..9bf4828584 100644 --- a/client/src/com/vaadin/client/ui/accordion/AccordionConnector.java +++ b/client/src/com/vaadin/client/ui/accordion/AccordionConnector.java @@ -21,6 +21,7 @@ import com.vaadin.client.ApplicationConnection; import com.vaadin.client.ComponentConnector; import com.vaadin.client.ConnectorHierarchyChangeEvent; import com.vaadin.client.UIDL; +import com.vaadin.client.Util; import com.vaadin.client.ui.SimpleManagedLayout; import com.vaadin.client.ui.VAccordion; import com.vaadin.client.ui.VAccordion.StackItem; @@ -108,7 +109,7 @@ public class AccordionConnector extends TabsheetBaseConnector implements usedPixels += item.getCaptionHeight(); } else { // This includes the captionNode borders - usedPixels += item.getHeight(); + usedPixels += Util.getRequiredHeight(item.getElement()); } } int rootElementInnerHeight = getLayoutManager().getInnerHeight( diff --git a/uitest/src/com/vaadin/tests/components/accordion/AccordionInactiveTabSize.java b/uitest/src/com/vaadin/tests/components/accordion/AccordionInactiveTabSize.java index 387ec7857f..00aadb58da 100644 --- a/uitest/src/com/vaadin/tests/components/accordion/AccordionInactiveTabSize.java +++ b/uitest/src/com/vaadin/tests/components/accordion/AccordionInactiveTabSize.java @@ -22,7 +22,7 @@ public class AccordionInactiveTabSize extends TestBase { protected void setup() { HorizontalSplitPanel sp = new HorizontalSplitPanel(); sp.setWidth("100%"); - sp.setHeight("70px"); + sp.setHeight("100px"); Accordion acc = new Accordion(); diff --git a/uitest/src/com/vaadin/tests/components/accordion/AccordionTheme.html b/uitest/src/com/vaadin/tests/components/accordion/AccordionTheme.html new file mode 100644 index 0000000000..4d04d30d88 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/accordion/AccordionTheme.html @@ -0,0 +1,60 @@ + + + + + + +com.vaadin.tests.components.accordion.AccordionInactiveTabSize + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
com.vaadin.tests.components.accordion.AccordionInactiveTabSize
open/run/com.vaadin.tests.components.accordion.AccordionInactiveTabSize?restartApplication&theme=base
screenCapturebase
open/run/com.vaadin.tests.components.accordion.AccordionInactiveTabSize?restartApplication&theme=runo
screenCaptureruno
open/run/com.vaadin.tests.components.accordion.AccordionInactiveTabSize?restartApplication&theme=chameleon
screenCapturechameleon
open/run/com.vaadin.tests.components.accordion.AccordionInactiveTabSize?restartApplication&theme=liferay
screenCaptureliferay
+ + \ No newline at end of file