From: Taehyub Kim Date: Thu, 31 Aug 2023 04:18:40 +0000 (+0900) Subject: [NUI] Apply constant value for default drag window size X-Git-Tag: submit/tizen/20230905.134715~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62671268367241e8afc8a539eec82e6124298ec0;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Apply constant value for default drag window size --- diff --git a/src/Tizen.NUI/src/public/DragAndDrop/DragAndDrop.cs b/src/Tizen.NUI/src/public/DragAndDrop/DragAndDrop.cs index 958059e26..0a2601cd3 100755 --- a/src/Tizen.NUI/src/public/DragAndDrop/DragAndDrop.cs +++ b/src/Tizen.NUI/src/public/DragAndDrop/DragAndDrop.cs @@ -38,11 +38,14 @@ namespace Tizen.NUI private Dictionary targetEventDictionary = new Dictionary(); private View mShadowView; private Window mDragWindow; - private int shadowWidth = 100; - private int shadowHeight = 100; + private int shadowWidth; + private int shadowHeight; private bool initDrag = false; + private const int MinDragWindowWidth = 100; + private const int MinDragWindowHeight = 100; + private DragAndDrop() : this(Interop.DragAndDrop.New(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -107,15 +110,14 @@ namespace Tizen.NUI shadowWidth = (int)shadowView.Size.Width; shadowHeight = (int)shadowView.Size.Height; - // Prevents shadowView size from being smaller than 100 pixel - if (shadowView.Size.Width < 100) + if (shadowView.Size.Width < MinDragWindowWidth) { - shadowWidth = 100; + shadowWidth = MinDragWindowWidth; } - if (shadowView.Size.Height < 100) + if (shadowView.Size.Height < MinDragWindowHeight) { - shadowHeight = 100; + shadowHeight = MinDragWindowHeight; } mDragWindow = new Window("DragWindow", new Rectangle(-shadowWidth, -shadowHeight, shadowWidth, shadowHeight), true)