Merge pull request #3767 from NativeScript/ios-corner-radius-dip

Fix iOS corner radiuses dip incorrectly converted
This commit is contained in:
Panayot Cankov
2017-03-10 11:27:41 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ export function checkUniformNativeBorderColor(v: view.View): boolean {
} }
export function getUniformNativeCornerRadius(v: view.View): number { export function getUniformNativeCornerRadius(v: view.View): number {
return (<UIView>v.ios).layer.cornerRadius; return utils.layout.toDevicePixels((<UIView>v.ios).layer.cornerRadius);
} }
export function checkNativeBackgroundColor(v: view.View): boolean { export function checkNativeBackgroundColor(v: view.View): boolean {

View File

@ -37,7 +37,7 @@ export module ios {
const borderColor = background.getUniformBorderColor(); const borderColor = background.getUniformBorderColor();
layer.borderColor = !borderColor ? undefined : borderColor.ios.CGColor; layer.borderColor = !borderColor ? undefined : borderColor.ios.CGColor;
layer.borderWidth = layout.toDeviceIndependentPixels(background.getUniformBorderWidth()); layer.borderWidth = layout.toDeviceIndependentPixels(background.getUniformBorderWidth());
layer.cornerRadius = background.getUniformBorderRadius(); layer.cornerRadius = layout.toDeviceIndependentPixels(background.getUniformBorderRadius());
} }
else { else {
drawNonUniformBorders(nativeView, background); drawNonUniformBorders(nativeView, background);