PositionUseAnchor enabled, samples added
authordongsug.song <dongsug.song@samsung.com>
Thu, 30 Mar 2017 14:30:45 +0000 (23:30 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Thu, 30 Mar 2017 14:30:45 +0000 (23:30 +0900)
Change-Id: I4c8182ea672063880954db4089c40f37d5960e91
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
src/Tizen.NUI/src/internal/Application.cs
src/Tizen.NUI/src/internal/DaliEnumConstants.cs
src/Tizen.NUI/src/public/Actor.cs
src/Tizen.NUI/src/public/View.cs

index 8b9e960..8f50284 100755 (executable)
@@ -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);
                 }
             }
 
index 7b56c45..9877386 100755 (executable)
@@ -74,4 +74,9 @@ namespace Tizen.NUI
       }
     }
   } // namespace Constants
+
+    public struct InternalSetting
+    {
+        public static bool DefaultParentOriginAsTopLeft = true;
+    }
 } // namesapce Dali
index c894a4d..6f238b5 100755 (executable)
@@ -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.
         /// </summary>
-        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));
             }
         }
 
index ae2db50..eccc543 100755 (executable)
@@ -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)