[NUI] fix scroll bar resources and add samples
authorEverLEEst(SangHyeon Jade Lee) <dltkdgus1764@gmail.com>
Mon, 29 Mar 2021 10:12:12 +0000 (19:12 +0900)
committerhuiyueun <35286162+huiyueun@users.noreply.github.com>
Tue, 20 Apr 2021 06:13:00 +0000 (15:13 +0900)
src/Tizen.NUI.Components/Controls/Scrollbar.cs
src/Tizen.NUI.Components/Theme/DefaultThemeCommon.cs
src/Tizen.NUI.Components/res/nui_component_default_scroll_hbar.#.png
src/Tizen.NUI.Components/res/nui_component_default_scroll_vbar.#.png
test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/ScrollableBaseOutOfBoundSample.cs

index 20a5b51..bdbab3e 100755 (executable)
@@ -292,10 +292,22 @@ namespace Tizen.NUI.Components
             this.isHorizontal = isHorizontal;
             if (isHorizontal)
             {
+                if (thumbHorizontalImageUrl != null)
+                {
+                    thumbView.ResourceUrl = thumbHorizontalImageUrl;
+                    thumbView.Color = thumbColor;
+                    thumbView.BackgroundColor = Color.Transparent;
+                }
                 calculator = new HorizontalCalculator(contentLength > 0.0f ? contentLength : 0.0f, viewportLength, currentPosition);
             }
             else
             {
+                if (thumbVerticalImageUrl != null)
+                {
+                    thumbView.ResourceUrl = thumbVerticalImageUrl;
+                    thumbView.Color = thumbColor;
+                    thumbView.BackgroundColor = Color.Transparent;
+                }
                 calculator = new VerticalCalculator(contentLength > 0.0f ? contentLength : 0.0f, viewportLength, currentPosition);
             }
 
index 0ef5d40..bf2a089 100755 (executable)
@@ -244,8 +244,8 @@ namespace Tizen.NUI.Components
 
             theme.AddStyleWithoutClone("Tizen.NUI.Components.Scrollbar", new ScrollbarStyle()
             {
-                TrackThickness = 14,
-                ThumbThickness = 14,
+                TrackThickness = 12,
+                ThumbThickness = 12,
                 TrackColor = new Color(0f, 0f, 0f, 0f),
                 ThumbColor = new Color("#0A0E4AFF"),
                 TrackPadding = 4,
index 1c70ce2..a55a5a3 100644 (file)
Binary files a/src/Tizen.NUI.Components/res/nui_component_default_scroll_hbar.#.png and b/src/Tizen.NUI.Components/res/nui_component_default_scroll_hbar.#.png differ
index a55a5a3..1c70ce2 100644 (file)
Binary files a/src/Tizen.NUI.Components/res/nui_component_default_scroll_vbar.#.png and b/src/Tizen.NUI.Components/res/nui_component_default_scroll_vbar.#.png differ
index caea544..cccfb28 100755 (executable)
@@ -37,6 +37,7 @@ namespace Tizen.NUI.Samples
             {
                 Size = new Size(400, 300),
                 ScrollingDirection = Components.ScrollableBase.Direction.Horizontal,
+                HideScrollbar = false,
             };
             horizontalScrollableBase.ScrollOutOfBound += OnHorizontalScrollOutOfBound;
 
@@ -82,6 +83,7 @@ namespace Tizen.NUI.Samples
                 Size = new Size(400, 300),
                 ScrollingDirection = Components.ScrollableBase.Direction.Vertical,
                 EnableOverShootingEffect = true,
+                HideScrollbar = false,
             };
             verticalScrollableBase.ScrollOutOfBound += OnVerticalScrollOutOfBound;