1- import { Application , Background , Button , Color , Length , View , androidDynamicElevationOffsetProperty , androidElevationProperty , backgroundInternalProperty , profile , PercentLength } from '@nativescript/core' ;
1+ import {
2+ Application ,
3+ Background ,
4+ Button ,
5+ Color ,
6+ Length ,
7+ PercentLength ,
8+ View ,
9+ androidDynamicElevationOffsetProperty ,
10+ androidElevationProperty ,
11+ backgroundInternalProperty ,
12+ profile
13+ } from '@nativescript/core' ;
214import { createRippleDrawable , createStateListAnimator , getAttrColor , getColorStateList , handleClearFocus , isPostLollipop , isPostLollipopMR1 , isPostMarshmallow } from './android/utils' ;
315import { CornerFamily , applyMixins } from './index.common' ;
416import { cssProperty , dynamicElevationOffsetProperty , elevationProperty , rippleColorProperty } from './cssproperties' ;
@@ -133,7 +145,7 @@ export class Themer {
133145 builder . setAllCornerSizes ( PercentLength . toDevicePixels ( options . cornerSize ) ) ;
134146 }
135147 } else {
136- builder . setAllCornerSizes ( options . cornerSize ) ;
148+ builder . setAllCornerSizes ( PercentLength . toDevicePixels ( options . cornerSize ) ) ;
137149 }
138150 }
139151 if ( options . cornerSizeBottomLeft !== undefined ) {
@@ -144,7 +156,7 @@ export class Themer {
144156 builder . setBottomLeftCornerSize ( PercentLength . toDevicePixels ( options . cornerSizeBottomLeft ) ) ;
145157 }
146158 } else {
147- builder . setBottomLeftCornerSize ( options . cornerSizeBottomLeft ) ;
159+ builder . setBottomLeftCornerSize ( PercentLength . toDevicePixels ( options . cornerSizeBottomLeft ) ) ;
148160 }
149161 }
150162 if ( options . cornerSizeBottomRight !== undefined ) {
@@ -155,7 +167,7 @@ export class Themer {
155167 builder . setBottomRightCornerSize ( PercentLength . toDevicePixels ( options . cornerSizeBottomRight ) ) ;
156168 }
157169 } else {
158- builder . setBottomRightCornerSize ( options . cornerSizeBottomRight ) ;
170+ builder . setBottomRightCornerSize ( PercentLength . toDevicePixels ( options . cornerSizeBottomRight ) ) ;
159171 }
160172 }
161173 if ( options . cornerSizeTopRight !== undefined ) {
@@ -166,7 +178,7 @@ export class Themer {
166178 builder . setTopRightCornerSize ( PercentLength . toDevicePixels ( options . cornerSizeTopRight ) ) ;
167179 }
168180 } else {
169- builder . setTopRightCornerSize ( options . cornerSizeTopRight ) ;
181+ builder . setTopRightCornerSize ( PercentLength . toDevicePixels ( options . cornerSizeTopRight ) ) ;
170182 }
171183 }
172184 if ( options . cornerSizeTopLeft !== undefined ) {
@@ -177,7 +189,7 @@ export class Themer {
177189 builder . setTopLeftCornerSize ( PercentLength . toDevicePixels ( options . cornerSizeTopLeft ) ) ;
178190 }
179191 } else {
180- builder . setTopLeftCornerSize ( options . cornerSizeTopLeft ) ;
192+ builder . setTopLeftCornerSize ( PercentLength . toDevicePixels ( options . cornerSizeTopLeft ) ) ;
181193 }
182194 }
183195 this . _shapes [ key ] = builder . build ( ) ;
0 commit comments