From: dongsug.song Date: Wed, 27 Apr 2022 05:04:44 +0000 (+0900) Subject: [NUI][SVACE] fix svace defect (add null check, replace TopCentor as Vector3 which... X-Git-Tag: accepted/tizen/unified/20231205.024657~1005 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e80da059ee39e611815970b0925fc5b9718e94cb;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI][SVACE] fix svace defect (add null check, replace TopCentor as Vector3 which is same) --- diff --git a/src/Tizen.NUI/src/public/Window/BorderWindow.cs b/src/Tizen.NUI/src/public/Window/BorderWindow.cs index 33505b0..dd804d8 100755 --- a/src/Tizen.NUI/src/public/Window/BorderWindow.cs +++ b/src/Tizen.NUI/src/public/Window/BorderWindow.cs @@ -369,8 +369,9 @@ namespace Tizen.NUI { borderWindowBottomLayer = new Layer(); borderWindowBottomLayer.Name = "BorderWindowBottomLayer"; - Interop.ActorInternal.SetParentOrigin(borderWindowBottomLayer.SwigCPtr, Tizen.NUI.ParentOrigin.TopCenter.SwigCPtr); - Interop.Actor.SetAnchorPoint(borderWindowBottomLayer.SwigCPtr, Tizen.NUI.PivotPoint.TopCenter.SwigCPtr); + using Vector3 topCentor = new Vector3(0.5f, 0.0f, 0.5f); + Interop.ActorInternal.SetParentOrigin(borderWindowBottomLayer.SwigCPtr, topCentor.SwigCPtr); + Interop.Actor.SetAnchorPoint(borderWindowBottomLayer.SwigCPtr, topCentor.SwigCPtr); Interop.Actor.Add(rootLayer.SwigCPtr, borderWindowBottomLayer.SwigCPtr); Interop.ActorInternal.SetSize(borderWindowBottomLayer.SwigCPtr, WindowSize.Width+borderInterface.BorderLineThickness * 2, WindowSize.Height + borderInterface.BorderLineThickness); borderWindowBottomLayer.SetWindow(this); @@ -387,8 +388,9 @@ namespace Tizen.NUI { borderWindowRootLayer = new Layer(); borderWindowRootLayer.Name = "RootLayer"; - Interop.ActorInternal.SetParentOrigin(borderWindowRootLayer.SwigCPtr, Tizen.NUI.ParentOrigin.TopCenter.SwigCPtr); - Interop.Actor.SetAnchorPoint(borderWindowRootLayer.SwigCPtr, Tizen.NUI.PivotPoint.TopCenter.SwigCPtr); + using Vector3 topCentor = new Vector3(0.5f, 0.0f, 0.5f); + Interop.ActorInternal.SetParentOrigin(borderWindowRootLayer.SwigCPtr, topCentor.SwigCPtr); + Interop.Actor.SetAnchorPoint(borderWindowRootLayer.SwigCPtr, topCentor.SwigCPtr); Interop.Actor.Add(rootLayer.SwigCPtr, borderWindowRootLayer.SwigCPtr); Interop.ActorInternal.SetSize(borderWindowRootLayer.SwigCPtr, WindowSize.Width, WindowSize.Height-borderInterface.BorderHeight - borderInterface.BorderLineThickness); Interop.ActorInternal.SetPosition(borderWindowRootLayer.SwigCPtr, 0, borderInterface.BorderLineThickness); diff --git a/src/Tizen.NUI/src/public/Window/DefaultBorder.cs b/src/Tizen.NUI/src/public/Window/DefaultBorder.cs index b3004ed..fa26f81 100755 --- a/src/Tizen.NUI/src/public/Window/DefaultBorder.cs +++ b/src/Tizen.NUI/src/public/Window/DefaultBorder.cs @@ -268,7 +268,7 @@ namespace Tizen.NUI } PanGesture panGesture = e.PanGesture; - if (panGesture.State == Gesture.StateType.Started) + if (panGesture.State == Gesture.StateType.Started && panGesture.Position != null) { direction = BorderWindow.GetDirection(panGesture.Position.X, panGesture.Position.Y); if (direction == Window.BorderDirection.Move)