/**
	A button in the mochi style. The active state of the button may be customized by
	applying a custom style.

		{kind: "mochi.Button", content: "Button"},
*/
enyo.kind({
	name: "mochi.Button",
	tag: "button",
	classes: "enyo-tool-decorator mochi-button",
	published: {
		disabled: false,
		active: false,
		content: "",
		barClasses: "",
		decoratorLeft: "(",
		decoratorRight: ")"
	},
	componentsRendered: false,
	initComponents: function() {
		this.moreComponents = ((this.components === undefined) || (this.components.length === 0)) ? null : this.components;
		this.components = null;
		this.inherited(arguments);
	},
	create: function() {
		this.inherited(arguments);
		this.buildButton();
		this.activeChanged();
		this.disabledChanged();
		this.decoratorLeftChanged();
		this.decoratorRightChanged();
	},
	rendered: function() {
		this.inherited(arguments);
		this.componentsRendered = true;
		this.calcBarValue();
		this.barClassesChanged();
	},
	buildButton: function() {
		// Button components
		var bc = [{kind: "mochi.ButtonDecoratorLeft"}, {kind: "enyo.Button", name: "button", tag: "div", classes: "mochi-button-base"}];
		if (this.moreComponents !== null) {
			var len = this.moreComponents.length;
			for (var i=0; i<len; i++) {
				bc.push(this.moreComponents[i]);
			}
		}
		bc.push({kind: "mochi.ButtonDecoratorRight"}, {name: "bar", classes: "mochi-button-bar"});
		this.createComponents(bc);
		this.$.button.setContent(this.content);
	},
	decoratorLeftChanged: function() {
		this.$.buttonDecoratorLeft.setContent(this.decoratorLeft);
	},
	decoratorRightChanged: function() {
		this.$.buttonDecoratorRight.setContent(this.decoratorRight);
	},
	activeChanged: function() {
		this.addRemoveClass("active", this.active);
	},
	disabledChanged: function() {
		this.setAttribute("disabled", this.disabled);
		this.addRemoveClass("disabled", this.disabled);
	},
	barClassesChanged: function(inOld) {
		this.$.bar.removeClass(inOld);
		this.$.bar.addClass(this.barClasses);
	},
	updateBarPosition: function(bounds) {
		this.$.bar.applyStyle("width", bounds.width + "px");
		this.$.bar.applyStyle("left", bounds.left + "px");
	},
	calcBarValue: function() {
		var bounds = this.$.button.getBounds();
		bounds.left += 4;
		this.updateBarPosition(bounds);
	},
	contentChanged: function() {
		if (this.componentsRendered) {
			this.$.button.setContent(this.content);
			this.calcBarValue();
		}
	}
});
@@ -387,207 +387,309 @@
 %7D,%0A%09
-componentsRendered: false,%0A%09initComponents: function() %7B%0A%09%09this.moreComponents = ((this.components === undefined) %7C%7C (this.components.length === 0)) ? null : this.components;%0A%09%09this.components = null
+tools: %5B%0A%09%09%7Bkind: %22mochi.ButtonDecoratorLeft%22%7D,%0A%09%09%7Bkind: %22enyo.Button%22, name: %22button%22, tag: %22div%22, classes: %22mochi-button-base%22%7D,%0A%09%09%7Bname: %22client%22%7D,%0A%09%09%7Bkind: %22mochi.ButtonDecoratorRight%22%7D,%0A%09%09%7Bname: %22bar%22, classes: %22mochi-button-bar%22%7D%0A%09%5D,%0A%09initComponents: function() %7B%0A%09%09this.createChrome(this.tools)
 ;%0A%09%09
@@ -774,30 +774,8 @@
 s);%0A
-%09%09this.buildButton();%0A
 %09%09th
@@ -944,42 +944,8 @@
 s);%0A
-%09%09this.componentsRendered = true;%0A
 %09%09th
@@ -999,513 +999,8 @@
 %09%7D,%0A
-%09buildButton: function() %7B%0A%09%09// Button components%0A%09%09var bc = %5B%7Bkind: %22mochi.ButtonDecoratorLeft%22%7D, %7Bkind: %22enyo.Button%22, name: %22button%22, tag: %22div%22, classes: %22mochi-button-base%22%7D%5D;%0A%09%09if (this.moreComponents !== null) %7B%0A%09%09%09var len = this.moreComponents.length;%0A%09%09%09for (var i=0; i%3Clen; i++) %7B%0A%09%09%09%09bc.push(this.moreComponents%5Bi%5D);%0A%09%09%09%7D%0A%09%09%7D%0A%09%09bc.push(%7Bkind: %22mochi.ButtonDecoratorRight%22%7D, %7Bname: %22bar%22, classes: %22mochi-button-bar%22%7D);%0A%09%09this.createComponents(bc);%0A%09%09this.$.button.setContent(this.content);%0A%09%7D,%0A
 %09dec
@@ -1752,28 +1752,8 @@
 ();%0A
-%09%09bounds.left += 4;%0A
 %09%09th
@@ -1820,42 +1820,8 @@
 ) %7B%0A
-%09%09if (this.componentsRendered) %7B%0A%09
 %09%09th
@@ -1860,17 +1860,16 @@
 ent);%0A%09%09
-%09
 this.cal
@@ -1885,12 +1885,8 @@
 ();%0A
-%09%09%7D%0A
 %09%7D%0A%7D

Fix contentChanged, add chrome