Skip to content

Commit

Permalink
Merge pull request tidev#5370 from gstreetmedia/TC-3820
Browse files Browse the repository at this point in the history
[TC-3820] Fixing:Button.js
  • Loading branch information
cb1kenobi committed Mar 31, 2014
2 parents 797671c + 0b25854 commit db2a3b2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions mobileweb/titanium/Ti/UI/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ define(['Ti/_/declare', 'Ti/_/UI/Widget', 'Ti/_/dom', 'Ti/_/css', 'Ti/_/style',
},
titlePost = {
post: function() {
this._buttonTitle.text = Locale._getString(this.titleid, this.title);
var text = Locale._getString(this.titleid, this.title);
//For platform consistency, covert leading spaces to non-breaking
this._buttonTitle.text = text.replace(/^[ \t]+/gm, function(x){ return new Array(x.length + 1).join(' ') });
this._hasSizeDimensions() && this._triggerLayout();
}
};
Expand Down Expand Up @@ -132,7 +134,12 @@ define(['Ti/_/declare', 'Ti/_/UI/Widget', 'Ti/_/dom', 'Ti/_/css', 'Ti/_/style',
},
value: true
},

font : {
set : function(value) {
this._buttonTitle.font = value;
return value;
}
},
image: {
set: function(value) {
this._buttonImage.image = value;
Expand Down

0 comments on commit db2a3b2

Please sign in to comment.