]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #3929 VButton horizontal width now works with IE and a smaller-than-the-theme...
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 4 Jan 2010 12:46:48 +0000 (12:46 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 4 Jan 2010 12:46:48 +0000 (12:46 +0000)
svn changeset:10608/svn branch:6.2

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

index de1d7206186446bf84c1ac65ed57f7dbff45c3d1..36d9f5ec1e20007ac76051ef636728886376956e 100644 (file)
@@ -394,6 +394,10 @@ public class VButton extends FocusWidget implements Paintable, ClickHandler {
                 int w = Integer
                         .parseInt(width.substring(0, width.length() - 2));
                 w -= getHorizontalBorderAndPaddingWidth(getElement());
+                if (w < 0) {
+                    // validity check for IE
+                    w = 0;
+                }
                 width = w + "px";
             }
         }