|
|
@ -869,14 +869,11 @@ namespace Avalonia.Controls |
|
|
} |
|
|
} |
|
|
else if (startupLocation == WindowStartupLocation.CenterOwner) |
|
|
else if (startupLocation == WindowStartupLocation.CenterOwner) |
|
|
{ |
|
|
{ |
|
|
if (owner != null) |
|
|
var ownerSize = owner.FrameSize ?? owner.ClientSize; |
|
|
{ |
|
|
var ownerRect = new PixelRect( |
|
|
var ownerSize = owner.FrameSize ?? owner.ClientSize; |
|
|
owner.Position, |
|
|
var ownerRect = new PixelRect( |
|
|
PixelSize.FromSize(ownerSize, scaling)); |
|
|
owner.Position, |
|
|
Position = ownerRect.CenterRect(rect).Position; |
|
|
PixelSize.FromSize(ownerSize, scaling)); |
|
|
|
|
|
Position = ownerRect.CenterRect(rect).Position; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|