summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
65504d2)
- This is temporary fix, just NUI workaround, will be removed later.
Change-Id: Ia17fb4cff3f9c2a063108b69dafc6df3448d00c1
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
{
Vector2 temp = new Vector2(0.0f, 0.0f);
GetProperty(View.Property.SCREEN_POSITION).Get(temp);
{
Vector2 temp = new Vector2(0.0f, 0.0f);
GetProperty(View.Property.SCREEN_POSITION).Get(temp);
+ // Dali's default layer is default center origin. need to change as top left.
+ // NUI's Layer is like a transparent film which covers entire window. (Layer is not an actor of Dali)
+ // otherwise, this makes ScreenPosition as wrong value.
+ temp -= (Window.Instance.GetSize() * 0.5f);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
if(Window.Instance != null)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
if(Window.Instance != null)
{
+ this.SetParentOrigin(Tizen.NUI.ParentOrigin.TopLeft);
this.SetAnchorPoint(Tizen.NUI.PivotPoint.TopLeft);
this.SetResizePolicy(ResizePolicyType.FillToParent, DimensionType.AllDimensions);
}
this.SetAnchorPoint(Tizen.NUI.PivotPoint.TopLeft);
this.SetResizePolicy(ResizePolicyType.FillToParent, DimensionType.AllDimensions);
}
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+ internal void SetParentOrigin(Vector3 origin)
+ {
+ NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
/// <summary>
/// Downcasts a handle to layer handle.
/// <summary>
/// Downcasts a handle to layer handle.
DisposeQueue disposeQ = DisposeQueue.Instance;
disposeQ.Initialize();
base.OnCreate();
DisposeQueue disposeQ = DisposeQueue.Instance;
disposeQ.Initialize();
base.OnCreate();
+
+ // Dali's default layer is default center origin. need to change as top left.
+ // NUI's Layer is like a transparent film which covers entire window. (Layer is not an actor of Dali)
+ // otherwise, this makes ScreenPosition as wrong value.
+ Layer defaultLayer = Window.GetDefaultLayer();
+ defaultLayer.SetParentOrigin(Tizen.NUI.ParentOrigin.TopLeft);
+ defaultLayer.SetAnchorPoint(Tizen.NUI.PivotPoint.TopLeft);