Skip to content

Commit

Permalink
Merge pull request #167 from unoplatform/dev/dr/unoSupport
Browse files Browse the repository at this point in the history
feat: Replicate changes made for multi-window support
  • Loading branch information
dr1rrb authored Feb 6, 2024
2 parents 148af33 + 91c09a3 commit 0d96706
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public UnitTestsControl()
GetContent: () => unitTestContentRoot.Content as UIElement,
SetContent: elt => unitTestContentRoot.Content = elt
);
UnitTestsUIContentHelper.CurrentTestWindow = XamlWindow.Current;
UnitTestsUIContentHelper.CurrentTestWindow ??= XamlWindow.Current;

DataContext = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public static async ValueTask<TestBitmap> ScreenShot(FrameworkElement element, b
{
case ScreenShotScalingMode.UsePhysicalPixelsWithImplicitScaling:
await renderer.RenderAsync(element);
bitmap = await TestBitmap.From(renderer, element, DisplayInformation.GetForCurrentView()?.RawPixelsPerViewPixel ?? 1);
bitmap = await TestBitmap.From(renderer, element, element.XamlRoot?.RasterizationScale ?? 1);
break;
case ScreenShotScalingMode.UseLogicalPixels:
await renderer.RenderAsync(element, (int)element.RenderSize.Width, (int)element.RenderSize.Height);
Expand Down

0 comments on commit 0d96706

Please sign in to comment.