From: dongsug.song Date: Thu, 30 Mar 2017 14:30:45 +0000 (+0900) Subject: PositionUseAnchor enabled, samples added X-Git-Tag: submit/trunk/20170823.075128~91^2~236 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=766c206638e8895ff4d7bd8a82033cafd1a23903;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git PositionUseAnchor enabled, samples added Change-Id: I4c8182ea672063880954db4089c40f37d5960e91 Signed-off-by: dongsug.song --- diff --git a/src/Tizen.NUI/src/internal/Application.cs b/src/Tizen.NUI/src/internal/Application.cs index 8b9e960..8f50284 100755 --- a/src/Tizen.NUI/src/internal/Application.cs +++ b/src/Tizen.NUI/src/internal/Application.cs @@ -1071,16 +1071,26 @@ namespace Tizen.NUI int ver2 = -1; int ver3 = -1; + try + { if (NDalicManualPINVOKE.NativeVersionCheck(ref ver1, ref ver2, ref ver3)) { if (ver1 != Version.ver1 || ver2 != Version.ver2 || ver3 != Version.ver3) { - throw new System.InvalidOperationException("Dali native version mismatch error! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3 + " but dali=" + ver1 + "." + ver2 + "." + ver3); + //throw new System.InvalidOperationException("Dali native version mismatch error! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3 + " but dali=" + ver1 + "." + ver2 + "." + ver3); + Tizen.Log.Fatal("NUI", "Dali native version mismatch error! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3 + " but dali=" + ver1 + "." + ver2 + "." + ver3); } } else { - throw new System.InvalidOperationException("Dali native version mismatch error! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3 + " but dali=" + ver1 + "." + ver2 + "." + ver3); + //throw new System.InvalidOperationException("Dali native version mismatch error! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3 + " but dali=" + ver1 + "." + ver2 + "." + ver3); + Tizen.Log.Fatal("NUI", "Dali native version mismatch error! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3 + " but dali=" + ver1 + "." + ver2 + "." + ver3); + } + } + catch (Exception e) + { + //throw new System.InvalidOperationException("Dali native version is very old! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3); + Tizen.Log.Fatal("NUI", "Dali native version is very old! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3); } } diff --git a/src/Tizen.NUI/src/internal/DaliEnumConstants.cs b/src/Tizen.NUI/src/internal/DaliEnumConstants.cs index 7b56c45..9877386 100755 --- a/src/Tizen.NUI/src/internal/DaliEnumConstants.cs +++ b/src/Tizen.NUI/src/internal/DaliEnumConstants.cs @@ -74,4 +74,9 @@ namespace Tizen.NUI } } } // namespace Constants + + public struct InternalSetting + { + public static bool DefaultParentOriginAsTopLeft = true; + } } // namesapce Dali diff --git a/src/Tizen.NUI/src/public/Actor.cs b/src/Tizen.NUI/src/public/Actor.cs index c894a4d..6f238b5 100755 --- a/src/Tizen.NUI/src/public/Actor.cs +++ b/src/Tizen.NUI/src/public/Actor.cs @@ -156,17 +156,17 @@ namespace Tizen.NUI /// Note: If false, then the top-left of the actor is used for the position. /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the actor's position. /// - public bool PositionUsesAnchorPoint + protected bool PositionUsesAnchorPoint { get { bool temp = false; - GetProperty(Actor.Property.POSITION_USES_ANCHOR_POINT).Get(ref temp); + if(this) GetProperty(Actor.Property.POSITION_USES_ANCHOR_POINT).Get(ref temp); return temp; } set { - SetProperty(Actor.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value)); + if(this) SetProperty(Actor.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value)); } } diff --git a/src/Tizen.NUI/src/public/View.cs b/src/Tizen.NUI/src/public/View.cs index ae2db50..eccc543 100755 --- a/src/Tizen.NUI/src/public/View.cs +++ b/src/Tizen.NUI/src/public/View.cs @@ -36,6 +36,7 @@ namespace Tizen.NUI // By default, we do not want the position to use the anchor point //this.PositionUsesAnchorPoint = false; + this.PositionUsesAnchorPoint = !(InternalSetting.DefaultParentOriginAsTopLeft); } internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)