diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2010-10-02 11:38:13 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2010-10-02 11:38:13 +0000 |
commit | 577c86186a245a7671561739baea0c1893f98d8b (patch) | |
tree | fc46754ce67e75bb22efe526b0621a0394239c2b | |
parent | 9f471c9e7ac986d9b10d6de189ec2b97d25328cc (diff) | |
download | vaadin-framework-577c86186a245a7671561739baea0c1893f98d8b.tar.gz vaadin-framework-577c86186a245a7671561739baea0c1893f98d8b.zip |
replaced hard coded style with a css rule
svn changeset:15308/svn branch:6.4
-rw-r--r-- | WebContent/VAADIN/themes/base/button/button.css | 4 | ||||
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java | 14 |
2 files changed, 4 insertions, 14 deletions
diff --git a/WebContent/VAADIN/themes/base/button/button.css b/WebContent/VAADIN/themes/base/button/button.css index 29dfab0de7..5051360bb3 100644 --- a/WebContent/VAADIN/themes/base/button/button.css +++ b/WebContent/VAADIN/themes/base/button/button.css @@ -130,6 +130,10 @@ /*
* Checkbox styles
* -------------------------------------- */
+
+ .v-checkbox {
+ display: block;
+ }
.v-checkbox,
.v-checkbox label,
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java b/src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java index 08111452f7..469fbf20ae 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java @@ -42,8 +42,6 @@ public class VCheckBox extends com.google.gwt.user.client.ui.CheckBox implements private Icon icon; - private boolean isBlockMode = false; - private HandlerRegistration focusHandlerRegistration; private HandlerRegistration blurHandlerRegistration; @@ -170,26 +168,14 @@ public class VCheckBox extends com.google.gwt.user.client.ui.CheckBox implements @Override public void setWidth(String width) { - setBlockMode(); super.setWidth(width); } @Override public void setHeight(String height) { - setBlockMode(); super.setHeight(height); } - /** - * makes container element (span) to be block element to enable sizing. - */ - private void setBlockMode() { - if (!isBlockMode) { - DOM.setStyleAttribute(getElement(), "display", "block"); - isBlockMode = true; - } - } - public void onFocus(FocusEvent arg0) { client.updateVariable(id, EventId.FOCUS, "", true); } |