mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
Label borders are transformed to DIP before setting to native view (#3795)
This commit is contained in:
@ -140,7 +140,7 @@ export class Label extends TextBase implements LabelDefinition {
|
|||||||
let nativeView = this.nativeView;
|
let nativeView = this.nativeView;
|
||||||
let border = nativeView.borderThickness;
|
let border = nativeView.borderThickness;
|
||||||
nativeView.borderThickness = {
|
nativeView.borderThickness = {
|
||||||
top: this.effectiveBorderTopWidth,
|
top: layout.toDeviceIndependentPixels(this.effectiveBorderTopWidth),
|
||||||
right: border.right,
|
right: border.right,
|
||||||
bottom: border.bottom,
|
bottom: border.bottom,
|
||||||
left: border.left
|
left: border.left
|
||||||
@ -155,7 +155,7 @@ export class Label extends TextBase implements LabelDefinition {
|
|||||||
let border = nativeView.borderThickness;
|
let border = nativeView.borderThickness;
|
||||||
nativeView.borderThickness = {
|
nativeView.borderThickness = {
|
||||||
top: border.top,
|
top: border.top,
|
||||||
right: this.effectiveBorderRightWidth,
|
right: layout.toDeviceIndependentPixels(this.effectiveBorderRightWidth),
|
||||||
bottom: border.bottom,
|
bottom: border.bottom,
|
||||||
left: border.left
|
left: border.left
|
||||||
};
|
};
|
||||||
@ -170,7 +170,7 @@ export class Label extends TextBase implements LabelDefinition {
|
|||||||
nativeView.borderThickness = {
|
nativeView.borderThickness = {
|
||||||
top: border.top,
|
top: border.top,
|
||||||
right: border.right,
|
right: border.right,
|
||||||
bottom: this.effectiveBorderBottomWidth,
|
bottom: layout.toDeviceIndependentPixels(this.effectiveBorderBottomWidth),
|
||||||
left: border.left
|
left: border.left
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -185,7 +185,7 @@ export class Label extends TextBase implements LabelDefinition {
|
|||||||
top: border.top,
|
top: border.top,
|
||||||
right: border.right,
|
right: border.right,
|
||||||
bottom: border.bottom,
|
bottom: border.bottom,
|
||||||
left: this.effectiveBorderLeftWidth
|
left: layout.toDeviceIndependentPixels(this.effectiveBorderLeftWidth)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user