Skip to content

Commit

Permalink
Merge pull request #343 from MrJul/fixes/scaling
Browse files Browse the repository at this point in the history
Fix previewer mouse position when using screen scaling
  • Loading branch information
maxkatz6 authored Jun 15, 2023
2 parents 46f4e1f + 421e95a commit c4fe23d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AvaloniaVS.Shared/Views/AvaloniaPreviewer.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ protected override void OnPreviewMouseWheel(MouseWheelEventArgs e)

private double GetScaling()
{
var result = Process?.Scaling ?? 1;
var result = (Process?.Scaling ?? 1) / VisualTreeHelper.GetDpi(this).DpiScaleX;
return result > 0 ? result : 1;
}

Expand Down

0 comments on commit c4fe23d

Please sign in to comment.