TextDecoration added to buttons for iOS

This commit is contained in:
Vladimir Enchev
2015-11-06 13:16:10 +02:00
parent 28bafb6cd5
commit f2db20c694

View File

@ -254,6 +254,15 @@ export class ButtonStyler implements definition.stylers.Styler {
(<UIButton>view._nativeView).contentEdgeInsets = UIEdgeInsetsFromString("{0,0,0,0}"); (<UIButton>view._nativeView).contentEdgeInsets = UIEdgeInsetsFromString("{0,0,0,0}");
} }
// text-decoration
private static setTextDecorationProperty(view: view.View, newValue: any) {
setTextDecoration((<UIButton>view.ios).titleLabel, newValue);
}
private static resetTextDecorationProperty(view: view.View, nativeValue: any) {
setTextDecoration((<UIButton>view.ios).titleLabel, enums.TextDecoration.none);
}
public static registerHandlers() { public static registerHandlers() {
style.registerHandler(style.colorProperty, new stylersCommon.StylePropertyChangedHandler( style.registerHandler(style.colorProperty, new stylersCommon.StylePropertyChangedHandler(
ButtonStyler.setColorProperty, ButtonStyler.setColorProperty,
@ -273,6 +282,10 @@ export class ButtonStyler implements definition.stylers.Styler {
style.registerHandler(style.nativePaddingsProperty, new stylersCommon.StylePropertyChangedHandler( style.registerHandler(style.nativePaddingsProperty, new stylersCommon.StylePropertyChangedHandler(
ButtonStyler.setPaddingProperty, ButtonStyler.setPaddingProperty,
ButtonStyler.resetPaddingProperty), "Button"); ButtonStyler.resetPaddingProperty), "Button");
style.registerHandler(style.textDecorationProperty, new stylersCommon.StylePropertyChangedHandler(
ButtonStyler.setTextDecorationProperty,
ButtonStyler.resetTextDecorationProperty), "Button");
} }
} }