]> source.dussan.org Git - vaadin-framework.git/commitdiff
Additional fix for #5906 - Menu shadow is too narrow in Chrome7. Previously the first...
authorArtur Signell <artur.signell@itmill.com>
Mon, 15 Nov 2010 16:23:27 +0000 (16:23 +0000)
committerArtur Signell <artur.signell@itmill.com>
Mon, 15 Nov 2010 16:23:27 +0000 (16:23 +0000)
svn changeset:15990/svn branch:6.5

src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java

index 277159b53c75c12868867247187b87a30c88f24b..3c1016e4b64e9ab4b5f4908cefe9a43c7f22090d 100644 (file)
@@ -77,6 +77,8 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable,
 
     private boolean enabled = true;
 
+    private String width = "notinited";
+
     public VMenuBar() {
         // Create an empty horizontal menubar
         this(false, null);
@@ -130,6 +132,11 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable,
 
     @Override
     public void setWidth(String width) {
+        if (Util.equals(this.width, width)) {
+            return;
+        }
+
+        this.width = width;
         Util.setWidthExcludingPaddingAndBorder(this, width, 0);
         if (!subMenu) {
             // Only needed for root level menu
@@ -888,7 +895,7 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable,
 
         private VMenuBar findRootMenu() {
             VMenuBar menubar = getParentMenu();
-           
+
             // Traverse up until root menu is found
             while (menubar.getParentMenu() != null) {
                 menubar = menubar.getParentMenu();