summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebContent/VAADIN/themes/base/menubar/menubar.css7
-rw-r--r--WebContent/VAADIN/themes/base/styles.css7
-rw-r--r--WebContent/VAADIN/themes/reindeer/menubar/menubar.css1
-rw-r--r--WebContent/VAADIN/themes/reindeer/styles.css8
-rw-r--r--WebContent/VAADIN/themes/runo/styles.css7
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java12
6 files changed, 28 insertions, 14 deletions
diff --git a/WebContent/VAADIN/themes/base/menubar/menubar.css b/WebContent/VAADIN/themes/base/menubar/menubar.css
index 93ff5466b6..52dc6ae545 100644
--- a/WebContent/VAADIN/themes/base/menubar/menubar.css
+++ b/WebContent/VAADIN/themes/base/menubar/menubar.css
@@ -1,12 +1,14 @@
.v-menubar {
float: left; /* Force minimum width */
- overflow: hidden;
+ white-space: nowrap;
}
.v-menubar .v-menubar-menuitem {
cursor: default;
vertical-align: middle;
white-space: nowrap;
- float: left;
+ display: inline;
+ display: inline-block;
+ zoom: 1;
}
.v-menubar .v-menubar-menuitem-caption * {
vertical-align: middle;
@@ -21,6 +23,7 @@
}
.v-menubar-submenu .v-menubar-menuitem {
cursor: default;
+ display: block;
position: relative;
padding-right: 1.5em;
}
diff --git a/WebContent/VAADIN/themes/base/styles.css b/WebContent/VAADIN/themes/base/styles.css
index 9e2b872b58..f1840c6bf2 100644
--- a/WebContent/VAADIN/themes/base/styles.css
+++ b/WebContent/VAADIN/themes/base/styles.css
@@ -647,13 +647,15 @@ div.v-app-loading {
.v-menubar {
float: left; /* Force minimum width */
- overflow: hidden;
+ white-space: nowrap;
}
.v-menubar .v-menubar-menuitem {
cursor: default;
vertical-align: middle;
white-space: nowrap;
- float: left;
+ display: inline;
+ display: inline-block;
+ zoom: 1;
}
.v-menubar .v-menubar-menuitem-caption * {
vertical-align: middle;
@@ -668,6 +670,7 @@ div.v-app-loading {
}
.v-menubar-submenu .v-menubar-menuitem {
cursor: default;
+ display: block;
position: relative;
padding-right: 1.5em;
}
diff --git a/WebContent/VAADIN/themes/reindeer/menubar/menubar.css b/WebContent/VAADIN/themes/reindeer/menubar/menubar.css
index ac60652d11..77903356ce 100644
--- a/WebContent/VAADIN/themes/reindeer/menubar/menubar.css
+++ b/WebContent/VAADIN/themes/reindeer/menubar/menubar.css
@@ -1,6 +1,5 @@
.v-menubar {
height: 23px;
- overflow: hidden;
background: #323336 repeat-x;
background-image: url(img/bg.png); /** sprite-ref: verticals; sprite-alignment: repeat */
color: #d1d3d6;
diff --git a/WebContent/VAADIN/themes/reindeer/styles.css b/WebContent/VAADIN/themes/reindeer/styles.css
index f8def1f262..2b298a2b33 100644
--- a/WebContent/VAADIN/themes/reindeer/styles.css
+++ b/WebContent/VAADIN/themes/reindeer/styles.css
@@ -647,13 +647,15 @@ div.v-app-loading {
.v-menubar {
float: left; /* Force minimum width */
- overflow: hidden;
+ white-space: nowrap;
}
.v-menubar .v-menubar-menuitem {
cursor: default;
vertical-align: middle;
white-space: nowrap;
- float: left;
+ display: inline;
+ display: inline-block;
+ zoom: 1;
}
.v-menubar .v-menubar-menuitem-caption * {
vertical-align: middle;
@@ -668,6 +670,7 @@ div.v-app-loading {
}
.v-menubar-submenu .v-menubar-menuitem {
cursor: default;
+ display: block;
position: relative;
padding-right: 1.5em;
}
@@ -3101,7 +3104,6 @@ td.v-datefield-calendarpanel-nextyear {
.v-menubar {
height: 23px;
- overflow: hidden;
background: #323336 repeat-x;
background-image: url(common/img/vertical-sprites.png);
-background-image: url(common/img/vertical-sprites-ie6.png);
diff --git a/WebContent/VAADIN/themes/runo/styles.css b/WebContent/VAADIN/themes/runo/styles.css
index a7d1dffdca..06bce5dfa9 100644
--- a/WebContent/VAADIN/themes/runo/styles.css
+++ b/WebContent/VAADIN/themes/runo/styles.css
@@ -647,13 +647,15 @@ div.v-app-loading {
.v-menubar {
float: left; /* Force minimum width */
- overflow: hidden;
+ white-space: nowrap;
}
.v-menubar .v-menubar-menuitem {
cursor: default;
vertical-align: middle;
white-space: nowrap;
- float: left;
+ display: inline;
+ display: inline-block;
+ zoom: 1;
}
.v-menubar .v-menubar-menuitem-caption * {
vertical-align: middle;
@@ -668,6 +670,7 @@ div.v-app-loading {
}
.v-menubar-submenu .v-menubar-menuitem {
cursor: default;
+ display: block;
position: relative;
padding-right: 1.5em;
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java
index 43ba72dc82..9cad1fbd91 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java
@@ -86,9 +86,12 @@ public class VMenuBar extends Widget implements Paintable,
@Override
public void setWidth(String width) {
Util.setWidthExcludingPaddingAndBorder(this, width, 0);
- hideChildren();
- setSelected(null);
- menuVisible = false;
+ if (!subMenu) {
+ // Only needed for root level menu
+ hideChildren();
+ setSelected(null);
+ menuVisible = false;
+ }
}
/**
@@ -657,7 +660,8 @@ public class VMenuBar extends Widget implements Paintable,
protected boolean isSeparator = false;
public CustomMenuItem(String html, Command cmd) {
- setElement(DOM.createDiv());
+ // We need spans to allow inline-block in IE
+ setElement(DOM.createSpan());
setHTML(html);
setCommand(cmd);