From eb0a22d5ac67808a89e046f81b7032955d41be3c Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Thu, 29 Nov 2012 20:31:02 +0200 Subject: [PATCH] Additional fixes for accordion/IE (#9552) Fixes Accordion for other themes than Reindeer aswell Change-Id: If849e77adfb07e6a14784139c19e45b3b35a43b9 --- .../themes/base/accordion/accordion.scss | 3 +- .../themes/reindeer/accordion/accordion.scss | 5 +- .../themes/runo/accordion/accordion.scss | 6 +- .../ui/accordion/AccordionConnector.java | 3 +- .../accordion/AccordionInactiveTabSize.java | 2 +- .../components/accordion/AccordionTheme.html | 60 +++++++++++++++++++ 6 files changed, 69 insertions(+), 10 deletions(-) create mode 100644 uitest/src/com/vaadin/tests/components/accordion/AccordionTheme.html 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 -- 2.39.5