aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2010-01-04 12:46:48 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2010-01-04 12:46:48 +0000
commit866648c5f9aa3ba5f52d2526b3ea2950d1e16cb5 (patch)
treed5612655feb9e54d797a53d042671c265118d9d0
parentcdd16d57305633125f6f9e3b0aaabc632b6f37bc (diff)
downloadvaadin-framework-866648c5f9aa3ba5f52d2526b3ea2950d1e16cb5.tar.gz
vaadin-framework-866648c5f9aa3ba5f52d2526b3ea2950d1e16cb5.zip
fixes #3929 VButton horizontal width now works with IE and a smaller-than-the-theme-supports-size
svn changeset:10608/svn branch:6.2
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VButton.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VButton.java b/src/com/vaadin/terminal/gwt/client/ui/VButton.java
index de1d720618..36d9f5ec1e 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VButton.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VButton.java
@@ -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";
}
}