From 0d401a70d1615a4440ce14e440e49ef37db8df86 Mon Sep 17 00:00:00 2001 From: Teppo Kurki Date: Mon, 15 Dec 2014 15:53:03 +0200 Subject: Fixes unnecessary padding-top added to all responsive UIs (#14679) When using Valo theme and Responsive extension, all responsive UIs get a padding-top even though it should be only added when a Valo Menu is present in the UI. Added a stylename which has to be added to any responsive UIs containing a Valo Menu. Change-Id: Ib3e3c5341bef03c174accb01401b4a90c1deb29e --- server/src/com/vaadin/ui/themes/ValoTheme.java | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'server/src') diff --git a/server/src/com/vaadin/ui/themes/ValoTheme.java b/server/src/com/vaadin/ui/themes/ValoTheme.java index d6bd97ed72..039c8491d3 100644 --- a/server/src/com/vaadin/ui/themes/ValoTheme.java +++ b/server/src/com/vaadin/ui/themes/ValoTheme.java @@ -880,6 +880,31 @@ public class ValoTheme { * **************************************************************************/ + /** + *

+ * When you use the Valo menu and wish to enable responsive features of the + * menu, you need to add this style name to the UI containing the menu. + *

+ * + *

+ * You only need to add this style name to the UI containing a Valo menu, if + * you're using the Responsive extension with the UI. + *

+ * + *

Example

+ * + *

+ * To enable responsivity in the Valo menu, the following example code + * should be executed in your UI containing the menu. + *

+ * + *
+     * Responsive.makeResponsive(this);
+     * addStyleName(ValoTheme.UI_WITH_MENU);
+     * 
+ */ + public static final String UI_WITH_MENU = "valo-menu-responsive"; + /** *

* Set the primary style name of a CssLayout to this, and -- cgit v1.2.3