Skip to content

Commit

Permalink
[NUI] Fix svace issue : infinite recursion
Browse files Browse the repository at this point in the history
Signed-off-by: Jiyun Yang <[email protected]>
  • Loading branch information
rabbitfor authored and bshsqa committed Jan 21, 2025
1 parent cf326ed commit 33ea3a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Tizen.NUI/src/public/Utility/GraphicsTypeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static float SpToPx(this float sp)
[EditorBrowsable(EditorBrowsableState.Never)]
public static float PxToDp(this float pixel)
{
return PxToDp(pixel);
return GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel);
}

/// <summary>
Expand All @@ -100,7 +100,7 @@ public static float PxToDp(this float pixel)
[EditorBrowsable(EditorBrowsableState.Never)]
public static float PxToSp(this float pixel)
{
return PxToSp(pixel);
return GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel);
}

/// <summary>
Expand Down Expand Up @@ -161,7 +161,7 @@ public static int SpToPx(this int sp)
[EditorBrowsable(EditorBrowsableState.Never)]
public static int PxToDp(this int pixel)
{
return (int)PxToDp(pixel);
return (int)PxToDp((float)pixel);
}

/// <summary>
Expand All @@ -173,7 +173,7 @@ public static int PxToDp(this int pixel)
[EditorBrowsable(EditorBrowsableState.Never)]
public static int PxToSp(this int pixel)
{
return (int)PxToSp(pixel);
return (int)PxToSp((float)pixel);
}

/// <summary>
Expand Down

0 comments on commit 33ea3a3

Please sign in to comment.