[NUI] Scrollbar does not change theme style
authorJiyun Yang <ji.yang@samsung.com>
Mon, 12 Apr 2021 05:30:02 +0000 (14:30 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 28 Apr 2021 03:36:30 +0000 (12:36 +0900)
Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
src/Tizen.NUI.Components/Controls/Scrollbar.cs

index e5f6856..c559c5f 100755 (executable)
@@ -435,7 +435,7 @@ namespace Tizen.NUI.Components
         {
             base.OnRelayout(size, container);
 
-            if (size.Width == containerSize.Width && size.Height == containerSize.Height)
+            if (size == null || size.Width == containerSize.Width && size.Height == containerSize.Height)
             {
                 return;
             }
@@ -457,18 +457,6 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         public override void ApplyStyle(ViewStyle viewStyle)
         {
-            if (viewStyle is ScrollbarStyle scrollbarStyle)
-            {
-                // Apply essential look.
-                if (scrollbarStyle.TrackThickness == null) scrollbarStyle.TrackThickness = 6.0f;
-                if (scrollbarStyle.ThumbThickness == null) scrollbarStyle.ThumbThickness = 6.0f;
-                if (scrollbarStyle.TrackColor == null) scrollbarStyle.TrackColor = new Color(1.0f, 1.0f, 1.0f, 0.15f);
-                if (scrollbarStyle.ThumbColor == null) scrollbarStyle.ThumbColor = new Color(0.6f, 0.6f, 0.6f, 1.0f);
-                if (scrollbarStyle.TrackPadding == null) scrollbarStyle.TrackPadding = 4;
-                if (scrollbarStyle.WidthResizePolicy == null) scrollbarStyle.WidthResizePolicy = ResizePolicyType.FillToParent;
-                if (scrollbarStyle.HeightResizePolicy == null) scrollbarStyle.HeightResizePolicy = ResizePolicyType.FillToParent;
-            }
-
             base.ApplyStyle(viewStyle);
         }