Thank you so much!
For anyone attempting to cut and paste this code to adjust text styles, be aware due to encoding some characters may cause a crash in your simulator. Better to type by hand! But otherwise Viveks code worked for me :)
QUOTE (Vivek Jani @ 23 Jan 2012 1:28 AM) For styling the button text, you need to pass "textStyles" attribute. The default styles used are mentioned in the theme.js file:
Theme.storage.add('ControlTextButtonText', {
//
styles: {
hOffset: 5,
width: Theme.keys.sidebar.width - 10,
truncation: 'end',
vAlign: 'center',
color: Theme.colors.text,
fontFamily: Theme.fonts.regular,
fontSize: 16,
paddingBottom: 1
}
//
});
So you can just copy everything as it is but change the color and you should have the desired text color.
this.controls.button1 = new KONtx.control.TextButton({
guid: "button0",
label: $_('view_0'),
styles: {
background:"#e28d45",
..
},
textStyles:{
hOffset: 5,
width: Theme.keys.sidebar.width - 10,
truncation: 'end',
vAlign: 'center',
color: "#000000",
fontFamily: Theme.fonts.regular,
fontSize: 16,
paddingBottom: 1
}
..
}).appendTo(this);
Thanks,
Vivek