Skip to content

Commit

Permalink
Fix GetBoundingBox/OverlayWindow touch point coordinate to DP (dotnet…
Browse files Browse the repository at this point in the history
  • Loading branch information
myroot committed Aug 25, 2022
1 parent ec4b27b commit 48f7b18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Core/src/Platform/Tizen/ViewExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using NColor = Tizen.NUI.Color;
using NView = Tizen.NUI.BaseComponents.View;
using Rect = Microsoft.Maui.Graphics.Rect;
using TRect = Tizen.UIExtensions.Common.Rect;

namespace Microsoft.Maui.Platform
{
Expand Down Expand Up @@ -247,7 +248,7 @@ internal static Rect GetPlatformViewBounds(this NView platformView)
if (platformView == null)
return new Rect();
var screenPostion = platformView.ScreenPosition;
return new Rect(screenPostion.X, screenPostion.Y, platformView.SizeWidth, platformView.SizeHeight);
return new TRect(screenPostion.X, screenPostion.Y, platformView.SizeWidth, platformView.SizeHeight).ToDP();
}

internal static Matrix4x4 GetViewTransform(this IView view)
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/WindowOverlay/WindowOverlay.Tizen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ protected override bool HitTest(Tizen.NUI.Touch touch)
if (touch == null)
return false;

var point = new Point(touch.GetLocalPosition(0).X, touch.GetLocalPosition(0).Y);
var point = new Point(touch.GetLocalPosition(0).X.ToScaledDP(), touch.GetLocalPosition(0).Y.ToScaledDP());

var disableTouchEvent = false;

Expand Down

0 comments on commit 48f7b18

Please sign in to comment.