summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebContent/VAADIN/themes/base/menubar/menubar.css6
-rw-r--r--WebContent/VAADIN/themes/base/shadow/shadow.css4
-rw-r--r--WebContent/VAADIN/themes/base/styles.css10
-rw-r--r--WebContent/VAADIN/themes/reindeer/menubar/menubar.css6
-rw-r--r--WebContent/VAADIN/themes/reindeer/styles.css16
-rw-r--r--WebContent/VAADIN/themes/runo/styles.css10
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java30
7 files changed, 64 insertions, 18 deletions
diff --git a/WebContent/VAADIN/themes/base/menubar/menubar.css b/WebContent/VAADIN/themes/base/menubar/menubar.css
index 909d714f13..e3e6becd6c 100644
--- a/WebContent/VAADIN/themes/base/menubar/menubar.css
+++ b/WebContent/VAADIN/themes/base/menubar/menubar.css
@@ -50,6 +50,12 @@
height: 100%;
font-size: 0.9em;
}
+.v-ie6 .v-menubar-submenu .v-menubar-submenu-indicator {
+ position: absolute;
+ right: 0;
+ margin-right: 0;
+ margin-top: -2px;
+}
.v-menubar-menuitem-disabled {
color: #999;
}
diff --git a/WebContent/VAADIN/themes/base/shadow/shadow.css b/WebContent/VAADIN/themes/base/shadow/shadow.css
index bc67f3cc59..209dd0e235 100644
--- a/WebContent/VAADIN/themes/base/shadow/shadow.css
+++ b/WebContent/VAADIN/themes/base/shadow/shadow.css
@@ -80,6 +80,6 @@
.v-ie6 .v-shadow {
background: #000;
filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2) alpha(opacity=20);
- margin-top: -3px;
- margin-left: -4px;
+ margin-top: -2px;
+ margin-left: -2px;
} \ No newline at end of file
diff --git a/WebContent/VAADIN/themes/base/styles.css b/WebContent/VAADIN/themes/base/styles.css
index 27afc8c299..6d075d5c50 100644
--- a/WebContent/VAADIN/themes/base/styles.css
+++ b/WebContent/VAADIN/themes/base/styles.css
@@ -673,6 +673,12 @@ div.v-app-loading {
height: 100%;
font-size: 0.9em;
}
+.v-ie6 .v-menubar-submenu .v-menubar-submenu-indicator {
+ position: absolute;
+ right: 0;
+ margin-right: 0;
+ margin-top: -2px;
+}
.v-menubar-menuitem-disabled {
color: #999;
}
@@ -1069,8 +1075,8 @@ div.v-progressindicator-indeterminate-disabled {
.v-ie6 .v-shadow {
background: #000;
filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2) alpha(opacity=20);
- margin-top: -3px;
- margin-left: -4px;
+ margin-top: -2px;
+ margin-left: -2px;
}
.v-slider {
diff --git a/WebContent/VAADIN/themes/reindeer/menubar/menubar.css b/WebContent/VAADIN/themes/reindeer/menubar/menubar.css
index 787453d15c..13f4fa72b0 100644
--- a/WebContent/VAADIN/themes/reindeer/menubar/menubar.css
+++ b/WebContent/VAADIN/themes/reindeer/menubar/menubar.css
@@ -26,7 +26,7 @@
padding: 4px 0;
}
.v-menubar-submenu .v-menubar-menuitem {
- padding: 1px 15px 1px 10px;
+ padding: 1px 20px 1px 10px;
height: 16px;
line-height: 16px;
}
@@ -41,9 +41,9 @@
background-image: url(img/menu-sel-bg.png); /** sprite-ref: verticals; sprite-alignment: repeat */
}
.v-menubar-submenu .v-menubar-submenu-indicator {
- background: transparent url(img/submenu-icon.png) no-repeat right 50%;
+ background: transparent url(img/submenu-icon.png) no-repeat right bottom;
width: 16px;
- margin: 0 -15px 0 5px;
+ margin: 0 -20px 0 5px;
text-indent: -999px;
vertical-align: middle;
}
diff --git a/WebContent/VAADIN/themes/reindeer/styles.css b/WebContent/VAADIN/themes/reindeer/styles.css
index 02fbb27d08..010a2f51ba 100644
--- a/WebContent/VAADIN/themes/reindeer/styles.css
+++ b/WebContent/VAADIN/themes/reindeer/styles.css
@@ -673,6 +673,12 @@ div.v-app-loading {
height: 100%;
font-size: 0.9em;
}
+.v-ie6 .v-menubar-submenu .v-menubar-submenu-indicator {
+ position: absolute;
+ right: 0;
+ margin-right: 0;
+ margin-top: -2px;
+}
.v-menubar-menuitem-disabled {
color: #999;
}
@@ -1069,8 +1075,8 @@ div.v-progressindicator-indeterminate-disabled {
.v-ie6 .v-shadow {
background: #000;
filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2) alpha(opacity=20);
- margin-top: -3px;
- margin-left: -4px;
+ margin-top: -2px;
+ margin-left: -2px;
}
.v-slider {
@@ -3033,7 +3039,7 @@ td.v-datefield-calendarpanel-nextyear {
padding: 4px 0;
}
.v-menubar-submenu .v-menubar-menuitem {
- padding: 1px 15px 1px 10px;
+ padding: 1px 20px 1px 10px;
height: 16px;
line-height: 16px;
}
@@ -3052,9 +3058,9 @@ td.v-datefield-calendarpanel-nextyear {
background-position: left -423px;
}
.v-menubar-submenu .v-menubar-submenu-indicator {
- background: transparent url(menubar/img/submenu-icon.png) no-repeat right 50%;
+ background: transparent url(menubar/img/submenu-icon.png) no-repeat right bottom;
width: 16px;
- margin: 0 -15px 0 5px;
+ margin: 0 -20px 0 5px;
text-indent: -999px;
vertical-align: middle;
}
diff --git a/WebContent/VAADIN/themes/runo/styles.css b/WebContent/VAADIN/themes/runo/styles.css
index cb949ff131..6d58d82006 100644
--- a/WebContent/VAADIN/themes/runo/styles.css
+++ b/WebContent/VAADIN/themes/runo/styles.css
@@ -673,6 +673,12 @@ div.v-app-loading {
height: 100%;
font-size: 0.9em;
}
+.v-ie6 .v-menubar-submenu .v-menubar-submenu-indicator {
+ position: absolute;
+ right: 0;
+ margin-right: 0;
+ margin-top: -2px;
+}
.v-menubar-menuitem-disabled {
color: #999;
}
@@ -1069,8 +1075,8 @@ div.v-progressindicator-indeterminate-disabled {
.v-ie6 .v-shadow {
background: #000;
filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2) alpha(opacity=20);
- margin-top: -3px;
- margin-left: -4px;
+ margin-top: -2px;
+ margin-left: -2px;
}
.v-slider {
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java
index c3a9c89884..c756b32453 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java
@@ -12,6 +12,7 @@ import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.DeferredCommand;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Event;
+import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.HasHTML;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.RootPanel;
@@ -51,6 +52,8 @@ public class VMenuBar extends Widget implements Paintable,
protected VMenuBar parentMenu;
protected CustomMenuItem selected;
+ private Timer layoutTimer;
+
public VMenuBar() {
// Create an empty horizontal menubar
this(false);
@@ -80,7 +83,8 @@ public class VMenuBar extends Widget implements Paintable,
}
this.subMenu = subMenu;
- sinkEvents(Event.ONCLICK | Event.ONMOUSEOVER | Event.ONMOUSEOUT);
+ sinkEvents(Event.ONCLICK | Event.ONMOUSEOVER | Event.ONMOUSEOUT
+ | Event.ONLOAD);
}
/**
@@ -129,7 +133,7 @@ public class VMenuBar extends Widget implements Paintable,
String moreItemText = moreItemUIDL.getStringAttribute("text");
if ("".equals(moreItemText)) {
- moreItemText = "▶";
+ moreItemText = "►";
}
itemHTML.append(moreItemText);
@@ -168,7 +172,7 @@ public class VMenuBar extends Widget implements Paintable,
itemHTML
.append("<span class=\"" + CLASSNAME
+ "-submenu-indicator\"" + bgStyle
- + ">&#x25B6;</span>");
+ + ">&#x25BA;</span>");
}
if (item.hasAttribute("icon")) {
@@ -355,6 +359,13 @@ public class VMenuBar extends Widget implements Paintable,
*/
@Override
public void onBrowserEvent(Event e) {
+ super.onBrowserEvent(e);
+
+ // Handle onload events (icon loaded, size changes)
+ if (DOM.eventGetType(e) == Event.ONLOAD) {
+ requestLayout();
+ return;
+ }
Element targetElement = DOM.eventGetTarget(e);
CustomMenuItem targetItem = null;
@@ -385,8 +396,19 @@ public class VMenuBar extends Widget implements Paintable,
break;
}
}
+ }
- super.onBrowserEvent(e);
+ private void requestLayout() {
+ if (layoutTimer == null) {
+ layoutTimer = new Timer() {
+ @Override
+ public void run() {
+ layoutTimer = null;
+ iLayout();
+ }
+ };
+ }
+ layoutTimer.schedule(100);
}
/**