mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 03:01:51 +08:00
Move the effective* values from style to this
This commit is contained in:
@ -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 };
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user