From: John Ahlroos Date: Tue, 2 Oct 2012 05:54:05 +0000 (+0300) Subject: Button now changes child element stylenames when primary style name is changed specif... X-Git-Tag: 7.0.0.beta6~87^2~11 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=be8ee9606012d3c3369e33e855673e8b9424139c;p=vaadin-framework.git Button now changes child element stylenames when primary style name is changed specifically #9724 --- diff --git a/client/src/com/vaadin/client/ui/button/VButton.java b/client/src/com/vaadin/client/ui/button/VButton.java index 2486876856..52987b01c1 100644 --- a/client/src/com/vaadin/client/ui/button/VButton.java +++ b/client/src/com/vaadin/client/ui/button/VButton.java @@ -115,6 +115,13 @@ public class VButton extends FocusWidget implements ClickHandler { captionElement.setClassName(getStylePrimaryName() + "-caption"); } + @Override + public void setStylePrimaryName(String style) { + super.setStylePrimaryName(style); + wrapper.setClassName(getStylePrimaryName() + "-wrap"); + captionElement.setClassName(getStylePrimaryName() + "-caption"); + } + public void setText(String text) { captionElement.setInnerText(text); }