[NUI] Add the default images of Pagination (#1641)
authorSeoyeon2Kim <34738918+Seoyeon2Kim@users.noreply.github.com>
Mon, 1 Jun 2020 08:08:28 +0000 (17:08 +0900)
committerGitHub <noreply@github.com>
Mon, 1 Jun 2020 08:08:28 +0000 (17:08 +0900)
- Even though users don't set Pagination images separately,
 the default images would be shown.

Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
packaging/PlatformFileList.txt
src/Tizen.NUI.Components/PreloadStyle/DefaultTheme.cs
src/Tizen.NUI.Components/PreloadStyle/WearableTheme.cs
src/Tizen.NUI.Components/Style/Theme.cs
src/Tizen.NUI.Components/res/nui_component_default_pagination_focus_dot.png [new file with mode: 0644]
src/Tizen.NUI.Components/res/nui_component_default_pagination_normal_dot.png [new file with mode: 0644]
src/Tizen.NUI.Wearable/src/public/CircularPagination.cs
src/Tizen.NUI.Wearable/src/public/WearableStyle/CircularPaginationStyle.cs

index f181bc0..24851b5 100755 (executable)
@@ -21,6 +21,8 @@ res/nui_component_default_slider_thumb_bg_p.png    #common #mobile #mobile-emul
 res/nui_component_default_slider_thumb_n.png       #common #mobile #mobile-emul #tv #wearable
 res/nui_component_default_dropdown_button_icon.png #common #mobile #mobile-emul #tv #wearable
 res/nui_component_default_dropdown_list_bg.png     #common #mobile #mobile-emul #tv #wearable
+res/nui_component_default_pagination_focus_dot.png #common #mobile #mobile-emul #tv #wearable
+res/nui_component_default_pagination_normal_dot.png #common #mobile #mobile-emul #tv #wearable
 res/nui_wearable_checkbox_icon.json                #wearable
 res/nui_wearable_radiobutton_icon.json             #wearable
 res/nui_wearable_switch_icon.json                  #wearable
index 973545b..8aba40e 100755 (executable)
@@ -427,5 +427,17 @@ namespace Tizen.NUI.Components
                 LoadingSize = new Size(100, 100)
             };
         }
+
+        protected override PaginationStyle GetPaginationStyle()
+        {
+            return new PaginationStyle
+            {
+                IndicatorImageURL = new Selector<string>()
+                {
+                    Normal = StyleManager.GetFrameworkResourcePath("nui_component_default_pagination_normal_dot.png"),
+                    Selected = StyleManager.GetFrameworkResourcePath("nui_component_default_pagination_focus_dot.png"),
+                },
+            };
+        }
     }
 }
index 79f1324..68ee411 100644 (file)
@@ -130,5 +130,17 @@ namespace Tizen.NUI.Components
                 LoadingSize = new Size(360, 360)
             };
         }
+
+        protected override PaginationStyle GetPaginationStyle()
+        {
+            return new PaginationStyle
+            {
+                IndicatorImageURL = new Selector<string>()
+                {
+                    Normal = StyleManager.GetFrameworkResourcePath("nui_component_default_pagination_normal_dot.png"),
+                    Selected = StyleManager.GetFrameworkResourcePath("nui_component_default_pagination_focus_dot.png"),
+                },
+            };
+        }
     }
 }
index 37765db..9e171cb 100755 (executable)
@@ -44,6 +44,7 @@ namespace Tizen.NUI.Components
             styleMap.Add(typeof(Tab), GetTabStyle);
             styleMap.Add(typeof(Toast), GetToastStyle);
             styleMap.Add(typeof(Loading), GetLoadingStyle);
+            styleMap.Add(typeof(Pagination), GetPaginationStyle);
         }
 
         internal delegate ViewStyle ComponentStyleGetter();
@@ -81,5 +82,7 @@ namespace Tizen.NUI.Components
         protected abstract ToastStyle GetToastStyle();
 
         protected abstract LoadingStyle GetLoadingStyle();
+
+        protected abstract PaginationStyle GetPaginationStyle();
     }
 }
diff --git a/src/Tizen.NUI.Components/res/nui_component_default_pagination_focus_dot.png b/src/Tizen.NUI.Components/res/nui_component_default_pagination_focus_dot.png
new file mode 100644 (file)
index 0000000..0737934
Binary files /dev/null and b/src/Tizen.NUI.Components/res/nui_component_default_pagination_focus_dot.png differ
diff --git a/src/Tizen.NUI.Components/res/nui_component_default_pagination_normal_dot.png b/src/Tizen.NUI.Components/res/nui_component_default_pagination_normal_dot.png
new file mode 100644 (file)
index 0000000..8aa8044
Binary files /dev/null and b/src/Tizen.NUI.Components/res/nui_component_default_pagination_normal_dot.png differ
index 6df90a8..1691f92 100755 (executable)
@@ -81,17 +81,6 @@ namespace Tizen.NUI.Wearable
         /// <since_tizen> 8 </since_tizen>
         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public CircularPagination(string style) : base(style)
-        {
-            Initialize();
-        }
-
-        /// <summary>
-        /// Creates a new instance of a CircularPagination using style.
-        /// </summary>
-        /// <since_tizen> 8 </since_tizen>
-        /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
         public CircularPagination(CircularPaginationStyle style) : base(style)
         {
             Initialize();
index 40c92dc..d165f32 100755 (executable)
@@ -37,7 +37,10 @@ namespace Tizen.NUI.Wearable
         /// <since_tizen> 8 </since_tizen>
         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public CircularPaginationStyle() : base() { }
+        public CircularPaginationStyle() : base()
+        {
+            Initialize();
+        }
 
         /// <summary>
         /// Creates a new instance of a CircularPaginationStyle using style.
@@ -103,5 +106,14 @@ namespace Tizen.NUI.Wearable
                 }
             }
         }
+
+        private void Initialize()
+        {
+            IndicatorImageURL = new Selector<string>()
+            {
+                Normal = "/usr/share/dotnet.tizen/framework/res/" + "nui_component_default_pagination_normal_dot.png",
+                Selected = "/usr/share/dotnet.tizen/framework/res/" + "nui_component_default_pagination_focus_dot.png",
+            };
+        }
     }
 }