Move the effective* values from style to this

This commit is contained in:
Panayot Cankov
2016-12-27 10:30:19 +02:00
parent fbb756e524
commit 70cc1dd5d9
23 changed files with 254 additions and 260 deletions

View File

@ -70,7 +70,7 @@ export class Button extends ButtonBase {
set [borderTopWidthProperty.native](value: Length) {
let inset = this.nativeView.contentEdgeInsets;
let style = this.style;
let top = style.effectivePaddingTop + style.effectiveBorderTopWidth;
let top = this.effectivePaddingTop + this.effectiveBorderTopWidth;
this.nativeView.contentEdgeInsets = { top: top, left: inset.left, bottom: inset.bottom, right: inset.right };
}
@ -83,7 +83,7 @@ export class Button extends ButtonBase {
set [borderRightWidthProperty.native](value: Length) {
let inset = this.nativeView.contentEdgeInsets;
let style = this.style;
let right = style.effectivePaddingRight + style.effectiveBorderRightWidth;
let right = this.effectivePaddingRight + this.effectiveBorderRightWidth;
this.nativeView.contentEdgeInsets = { top: inset.top, left: inset.left, bottom: inset.bottom, right: right };
}
@ -96,7 +96,7 @@ export class Button extends ButtonBase {
set [borderBottomWidthProperty.native](value: Length) {
let inset = this.nativeView.contentEdgeInsets;
let style = this.style;
let bottom = style.effectivePaddingBottom + style.effectiveBorderBottomWidth;
let bottom = this.effectivePaddingBottom + this.effectiveBorderBottomWidth;
this.nativeView.contentEdgeInsets = { top: inset.top, left: inset.left, bottom: bottom, right: inset.right };
}
@ -109,7 +109,7 @@ export class Button extends ButtonBase {
set [borderLeftWidthProperty.native](value: Length) {
let inset = this.nativeView.contentEdgeInsets;
let style = this.style;
let left = style.effectivePaddingLeft + style.effectiveBorderLeftWidth;
let left = this.effectivePaddingLeft + this.effectiveBorderLeftWidth;
this.nativeView.contentEdgeInsets = { top: inset.top, left: left, bottom: inset.bottom, right: inset.right };
}
@ -122,7 +122,7 @@ export class Button extends ButtonBase {
set [paddingTopProperty.native](value: Length) {
let inset = this.nativeView.contentEdgeInsets;
let style = this.style;
let top = style.effectivePaddingTop + style.effectiveBorderTopWidth;
let top = this.effectivePaddingTop + this.effectiveBorderTopWidth;
this.nativeView.contentEdgeInsets = { top: top, left: inset.left, bottom: inset.bottom, right: inset.right };
}
@ -135,7 +135,7 @@ export class Button extends ButtonBase {
set [paddingRightProperty.native](value: Length) {
let inset = this.nativeView.contentEdgeInsets;
let style = this.style;
let right = style.effectivePaddingRight + style.effectiveBorderRightWidth;
let right = this.effectivePaddingRight + this.effectiveBorderRightWidth;
this.nativeView.contentEdgeInsets = { top: inset.top, left: inset.left, bottom: inset.bottom, right: right };
}
@ -148,7 +148,7 @@ export class Button extends ButtonBase {
set [paddingBottomProperty.native](value: Length) {
let inset = this.nativeView.contentEdgeInsets;
let style = this.style;
let bottom = style.effectivePaddingBottom + style.effectiveBorderBottomWidth;
let bottom = this.effectivePaddingBottom + this.effectiveBorderBottomWidth;
this.nativeView.contentEdgeInsets = { top: inset.top, left: inset.left, bottom: bottom, right: inset.right };
}
@ -161,7 +161,7 @@ export class Button extends ButtonBase {
set [paddingLeftProperty.native](value: Length) {
let inset = this.nativeView.contentEdgeInsets;
let style = this.style;
let left = style.effectivePaddingLeft + style.effectiveBorderLeftWidth;
let left = this.effectivePaddingLeft + this.effectiveBorderLeftWidth;
this.nativeView.contentEdgeInsets = { top: inset.top, left: left, bottom: inset.bottom, right: inset.right };
}
}