From: dongsug-song <35130733+dongsug-song@users.noreply.github.com> Date: Fri, 14 Dec 2018 07:26:59 +0000 (+0900) Subject: [NUI] RootLayout call RequestRelayout() when Window changed size or position (#615) X-Git-Tag: submit/tizen_5.0/20181214.073727~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d97ef8b707cd62bcc84a081a0ae08449484af43;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] RootLayout call RequestRelayout() when Window changed size or position (#615) --- diff --git a/src/Tizen.NUI/src/public/Window.cs b/src/Tizen.NUI/src/public/Window.cs index 527c9ec84..09e3d8cc4 100755 --- a/src/Tizen.NUI/src/public/Window.cs +++ b/src/Tizen.NUI/src/public/Window.cs @@ -34,6 +34,7 @@ namespace Tizen.NUI private readonly global::System.Runtime.InteropServices.HandleRef rootLayoutCPtr; private Layer _rootLayer; private string _windowTitle; + private readonly LayoutItem rootLayoutItem; private List _childLayers = new List(); internal List LayersChildren @@ -60,6 +61,12 @@ namespace Tizen.NUI Layer rootLayer = GetRootLayer(); // Add the root layout created above to the root layer. NDalicPINVOKE.Actor_Add( Layer.getCPtr(rootLayer), rootLayoutCPtr ); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + global::System.IntPtr rootControlLayoutIntPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(rootLayoutCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + rootLayoutItem = new LayoutItem(rootControlLayoutIntPtr, true); } } @@ -1467,6 +1474,11 @@ namespace Tizen.NUI NDalicManualPINVOKE.SetSize(swigCPtr, Uint16Pair.getCPtr(val)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + if(rootLayoutItem != null) + { + rootLayoutItem.RequestLayout(); + } } internal Size2D GetWindowSize() @@ -1484,6 +1496,11 @@ namespace Tizen.NUI NDalicManualPINVOKE.SetPosition(swigCPtr, Uint16Pair.getCPtr(val)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + if(rootLayoutItem != null) + { + rootLayoutItem.RequestLayout(); + } } internal Position2D GetPosition() @@ -1499,6 +1516,11 @@ namespace Tizen.NUI { NDalicPINVOKE.Window_SetPositionSize(swigCPtr, Rectangle.getCPtr(positionSize)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + if(rootLayoutItem != null) + { + rootLayoutItem.RequestLayout(); + } } ///