From 0b3ca5b9604f956614d9e83e7af7557c38f8dfe2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Fri, 17 Feb 2012 12:59:41 +0200 Subject: [PATCH] Avoid captions wrapping over multiple rows (#8313) --- .../VAADIN/themes/base/caption/caption.css | 22 ++++--------------- .../vaadin/terminal/gwt/client/VCaption.java | 10 --------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/WebContent/VAADIN/themes/base/caption/caption.css b/WebContent/VAADIN/themes/base/caption/caption.css index 549d4f9cef..364b68a226 100644 --- a/WebContent/VAADIN/themes/base/caption/caption.css +++ b/WebContent/VAADIN/themes/base/caption/caption.css @@ -6,32 +6,18 @@ white-space: nowrap; } .v-errorindicator { - float: left; + display: inline-block; } .v-caption .v-icon { - float: left; + display: inline-block; padding-right: 2px; vertical-align: middle; } .v-caption .v-captiontext { - float: left; + display: inline-block; overflow: hidden; vertical-align: middle; } .v-caption .v-required-field-indicator { - float: left; + display: inline-block; } - -.v-caption-clearelem { - clear: both; - width: 0; - height: 0; - overflow: hidden; -} - -.v-ie9 .v-gridlayout-margin>div>div>.v-caption, -.v-ie9 .v-verticallayout>div>div>.v-caption, -.v-ie9 .v-horizontallayout>div>div>.v-caption { - /* Fix possible sub pixel rounding errors that cause error indicators to drop */ - margin-right:-0.5px; -} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/VCaption.java b/src/com/vaadin/terminal/gwt/client/VCaption.java index f6d8ffe58e..286d3fc17f 100644 --- a/src/com/vaadin/terminal/gwt/client/VCaption.java +++ b/src/com/vaadin/terminal/gwt/client/VCaption.java @@ -24,8 +24,6 @@ public class VCaption extends HTML { private Element captionText; - private Element clearElement; - private final ApplicationConnection client; private boolean placedAfterComponent = false; @@ -39,8 +37,6 @@ public class VCaption extends HTML { protected static final String ATTRIBUTE_ERROR = "error"; protected static final String ATTRIBUTE_HIDEERRORS = "hideErrors"; - private static final String CLASSNAME_CLEAR = CLASSNAME + "-clearelem"; - /** * * @param component @@ -196,12 +192,6 @@ public class VCaption extends HTML { errorIndicatorElement = null; } - if (clearElement == null) { - clearElement = DOM.createDiv(); - clearElement.setClassName(CLASSNAME_CLEAR); - getElement().appendChild(clearElement); - } - return (wasPlacedAfterComponent != placedAfterComponent); } -- 2.39.5