[NUI] Update the default size of Loading (#1623)
authorSeoyeon2Kim <34738918+Seoyeon2Kim@users.noreply.github.com>
Wed, 27 May 2020 01:21:29 +0000 (10:21 +0900)
committerGitHub <noreply@github.com>
Wed, 27 May 2020 01:21:29 +0000 (10:21 +0900)
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
- Removed the initialized size of Loading visual.
- Added the default size value on Loading PreloadStyle
- Modified InputMethodContext description slightly.

src/Tizen.NUI.Components/Controls/Loading.cs
src/Tizen.NUI.Components/PreloadStyle/DefaultTheme.cs
src/Tizen.NUI.Components/PreloadStyle/WearableTheme.cs
src/Tizen.NUI.Components/Style/Theme.cs
src/Tizen.NUI/src/public/InputMethodContext.cs

index 0907ac0..380379e 100755 (executable)
@@ -52,7 +52,7 @@ namespace Tizen.NUI.Components
             if (newValue != null)
             {
                 Size size = (Size)newValue;
-                instance.Style.Size = size;
+                ((View)bindable).Size = size;
                 if (null != instance.imageVisual)
                 {
                     instance.imageVisual.Size = new Size2D((int)size.Width, (int)size.Height);
@@ -72,7 +72,7 @@ namespace Tizen.NUI.Components
             if (newValue != null)
             {
                 int frameRate = (int)newValue;
-                if (0 != frameRate) //It will crash if 0 
+                if (0 != frameRate) //It will crash if 0
                 {
                     instance.Style.FrameRate.All = frameRate;
                     instance.imageVisual.FrameDelay = 1000.0f / frameRate;
@@ -170,7 +170,7 @@ namespace Tizen.NUI.Components
             }
             set
             {
-                SetValue(SizeProperty, value); 
+                SetValue(SizeProperty, value);
             }
         }
 
@@ -231,7 +231,6 @@ namespace Tizen.NUI.Components
                 URLS = new List<string>(),
                 FrameDelay = 16.6f,
                 LoopCount = -1,
-                Size = new Size2D(100, 100),
                 Position = new Vector2(0, 0),
                 Origin = Visual.AlignType.Center,
                 AnchorPoint = Visual.AlignType.Center
@@ -254,7 +253,7 @@ namespace Tizen.NUI.Components
             }
             if (null != Style.LoadingSize)
             {
-                imageVisual.Size = new Size2D((int)Style.LoadingSize.Width, (int)Style.LoadingSize.Height);
+                this.Size = new Size2D((int)Style.LoadingSize.Width, (int)Style.LoadingSize.Height);
             }
         }
     }
index 344c2a7..5e2a1a7 100644 (file)
@@ -399,5 +399,13 @@ namespace Tizen.NUI.Components
                 }
             };
         }
+
+        protected override LoadingStyle GetLoadingStyle()
+        {
+            return new LoadingStyle
+            {
+                LoadingSize = new Size(100, 100)
+            };
+        }
     }
 }
index 7f270eb..79f1324 100644 (file)
@@ -122,5 +122,13 @@ namespace Tizen.NUI.Components
                 },
             };
         }
+
+        protected override LoadingStyle GetLoadingStyle()
+        {
+            return new LoadingStyle
+            {
+                LoadingSize = new Size(360, 360)
+            };
+        }
     }
 }
index fc84192..0cb7494 100644 (file)
@@ -42,6 +42,7 @@ namespace Tizen.NUI.Components
             styleMap.Add(typeof(Switch), GetSwitchStyle);
             styleMap.Add(typeof(Tab), GetTabStyle);
             styleMap.Add(typeof(Toast), GetToastStyle);
+            styleMap.Add(typeof(Loading), GetLoadingStyle);
         }
 
         internal delegate ViewStyle ComponentStyleGetter();
@@ -75,5 +76,7 @@ namespace Tizen.NUI.Components
         protected abstract TabStyle GetTabStyle();
 
         protected abstract ToastStyle GetToastStyle();
+
+        protected abstract LoadingStyle GetLoadingStyle();
     }
 }
index 53a6ddb..410df0a 100755 (executable)
@@ -366,7 +366,7 @@ namespace Tizen.NUI
         public enum InputPanelLanguage
         {
             /// <summary>
-            /// IME Language automatically set depending on the system display.
+            /// IME Language is automatically set depending on the system display.
             /// </summary>
             /// <since_tizen> 8 </since_tizen>
             Automatic,