@@ -227,7 +227,7 @@ export class Control implements IAnimatable, IFocusableControl {
227227 private _cacheData : Nullable < ImageData > ;
228228
229229 private _shadowOffsetX = 0 ;
230- /** Gets or sets a value indicating the offset to apply on X axis to render the shadow */
230+ /** Gets or sets a value indicating the offset in pixels to apply on X axis to render the shadow */
231231 @serialize ( )
232232 public get shadowOffsetX ( ) {
233233 return this . _shadowOffsetX ;
@@ -243,7 +243,7 @@ export class Control implements IAnimatable, IFocusableControl {
243243 }
244244
245245 private _shadowOffsetY = 0 ;
246- /** Gets or sets a value indicating the offset to apply on Y axis to render the shadow */
246+ /** Gets or sets a value indicating the offset in pixels to apply on Y axis to render the shadow */
247247 @serialize ( )
248248 public get shadowOffsetY ( ) {
249249 return this . _shadowOffsetY ;
@@ -1743,8 +1743,8 @@ export class Control implements IAnimatable, IFocusableControl {
17431743 Measure . CombineToRef ( this . _tmpMeasureA , this . _prevCurrentMeasureTransformedIntoGlobalSpace , this . _tmpMeasureA ) ;
17441744
17451745 // Expand rect based on shadows
1746- const shadowOffsetX = this . shadowOffsetX ;
1747- const shadowOffsetY = this . shadowOffsetY ;
1746+ const shadowOffsetX = this . shadowOffsetX * this . _host . idealRatio ;
1747+ const shadowOffsetY = this . shadowOffsetY * this . _host . idealRatio ;
17481748 const shadowBlur = Math . max ( this . _previousShadowBlur , this . shadowBlur ) ;
17491749
17501750 const leftShadowOffset = Math . min ( Math . min ( shadowOffsetX , 0 ) - shadowBlur * 2 , 0 ) ;
@@ -2179,8 +2179,8 @@ export class Control implements IAnimatable, IFocusableControl {
21792179 }
21802180
21812181 if ( this . shadowBlur || this . shadowOffsetX || this . shadowOffsetY ) {
2182- const shadowOffsetX = this . shadowOffsetX ;
2183- const shadowOffsetY = this . shadowOffsetY ;
2182+ const shadowOffsetX = this . shadowOffsetX * this . _host . idealRatio ;
2183+ const shadowOffsetY = this . shadowOffsetY * this . _host . idealRatio ;
21842184 const shadowBlur = this . shadowBlur ;
21852185
21862186 const leftShadowOffset = Math . min ( Math . min ( shadowOffsetX , 0 ) - shadowBlur * 2 , 0 ) ;
0 commit comments