[NUI] fix svace issue. check Selected item existance.
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Components / Theme / DefaultThemeCommon.cs
1 /*
2  * Copyright(c) 2022 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 #if !PROFILE_WEARABLE
18
19 using System.Diagnostics.CodeAnalysis;
20 using Tizen.NUI.BaseComponents;
21
22 namespace Tizen.NUI.Components
23 {
24     // It is a C# version of res/Tizen.NUI.Components_Tizen.NUI.Theme.Common.xaml
25     internal partial class DefaultThemeCreator : IThemeCreator
26     {
27         /// <summary>
28         /// The base theme description.
29         /// </summary>
30         [SuppressMessage("Microsoft.Reliability", "CA2000: Dispose objects before losing scope", Justification = "The responsibility to dispose the object is transferred to the theme object.")]
31         public Theme Create()
32         {
33             var theme = new Theme()
34             {
35                 Id = Tizen.NUI.DefaultThemeCreator.DefaultId,
36                 Version = Tizen.NUI.DefaultThemeCreator.DefaultVersion
37             };
38
39             // Button base style
40             theme.AddStyleWithoutClone("Tizen.NUI.Components.Button", new ButtonStyle()
41             {
42                 Padding = new Extents(32, 32, 8, 8),
43                 ItemSpacing = new Size2D(8, 8),
44                 CornerRadius = 12.0f,
45                 ItemHorizontalAlignment = HorizontalAlignment.Center,
46                 ItemVerticalAlignment = VerticalAlignment.Center,
47                 BackgroundColor = new Selector<Color>()
48                 {
49                     Normal = new Color(1.0f, 0.384f, 0.0f, 1),
50                     Pressed = new Color(0.85f, 0.325f, 0.0f, 1),
51                     Focused = new Color(1.0f, 0.827f, 0.624f, 1),
52                     Selected = new Color(0.624f, 0.239f, 0.0f, 1),
53                     Disabled = new Color(0.792f, 0.792f, 0.792f, 1),
54                 },
55                 Text = new TextLabelStyle()
56                 {
57                     TextColor = new Color("#FDFDFD"),
58                     PixelSize = 24,
59                 }
60             });
61
62             // Outlined Button style
63             theme.AddStyleWithoutClone("Tizen.NUI.Components.Button.Outlined", new ButtonStyle()
64             {
65                 Padding = new Extents(32, 32, 8, 8),
66                 ItemSpacing = new Size2D(8, 8),
67                 CornerRadius = 12.0f,
68                 BorderlineWidth = 2.0f,
69                 BorderlineColorSelector = new Selector<Color>()
70                 {
71                     Normal = new Color("#FF6200"),
72                     Pressed = new Color("#FFA166"),
73                     Focused = new Color("#FF7119"),
74                     Selected = new Color("#FF8133"),
75                     Disabled = new Color("#CACACA"),
76                 },
77                 ItemHorizontalAlignment = HorizontalAlignment.Center,
78                 ItemVerticalAlignment = VerticalAlignment.Center,
79                 BackgroundColor = Color.Transparent,
80                 Text = new TextLabelStyle()
81                 {
82                     TextColor = new Selector<Color>()
83                     {
84                         Normal = new Color("#FF6200"),
85                         Pressed = new Color("#FFA166"),
86                         Focused = new Color("#FF7119"),
87                         Selected = new Color("#FF8133"),
88                         Disabled = new Color("#CACACA"),
89                     },
90                     PixelSize = 24,
91                 }
92             });
93
94             // TextOnly Button style
95             theme.AddStyleWithoutClone("Tizen.NUI.Components.Button.TextOnly", new ButtonStyle()
96             {
97                 Padding = new Extents(32, 32, 8, 8),
98                 ItemHorizontalAlignment = HorizontalAlignment.Center,
99                 ItemVerticalAlignment = VerticalAlignment.Center,
100                 BackgroundColor = Color.Transparent,
101                 Text = new TextLabelStyle()
102                 {
103                     TextColor = new Selector<Color>()
104                     {
105                         Normal = new Color("#FF6200"),
106                         Pressed = new Color("#FFA166"),
107                         Focused = new Color("#FF7119"),
108                         Selected = new Color("#FF8133"),
109                         Disabled = new Color("#CACACA"),
110                     },
111                     PixelSize = 24,
112                 }
113             });
114
115             // CheckBox base style
116             theme.AddStyleWithoutClone("Tizen.NUI.Components.CheckBox", new ButtonStyle()
117             {
118                 Padding = new Extents(8, 8, 8, 8),
119                 ItemSpacing = new Size2D(16, 16),
120                 ItemHorizontalAlignment = HorizontalAlignment.Center,
121                 ItemVerticalAlignment = VerticalAlignment.Center,
122                 Icon = new ImageViewStyle()
123                 {
124                     Size = new Size(32, 32),
125                     ResourceUrl = new Selector<string>()
126                     {
127                         Normal = FrameworkInformation.ResourcePath + "IoT_check_off.png",
128                         Pressed = FrameworkInformation.ResourcePath + "IoT_check_off_p.png",
129                         Disabled = FrameworkInformation.ResourcePath + "IoT_check_off_d.png",
130                         Focused = FrameworkInformation.ResourcePath + "IoT_check_off_f.png",
131                         Selected = FrameworkInformation.ResourcePath + "IoT_check_on.png",
132                         SelectedPressed = FrameworkInformation.ResourcePath + "IoT_check_on_p.png",
133                         SelectedFocused = FrameworkInformation.ResourcePath + "IoT_check_on_f.png",
134                         DisabledSelected = FrameworkInformation.ResourcePath + "IoT_check_on_d.png",
135                     },
136                 },
137                 Text = new TextLabelStyle()
138                 {
139                     TextColor = new Selector<Color>()
140                     {
141                         Normal = new Color("#090E21"),
142                         Selected = new Color("#FF6200"),
143                         Disabled = new Color("#CACACA"),
144                     },
145                     PixelSize = 24,
146                 }
147             });
148
149             // Popup base style
150             theme.AddStyleWithoutClone("Tizen.NUI.Components.Popup", new PopupStyle()
151             {
152                 Size = new Size(500, 280),
153                 BackgroundColor = new Color(0.9f, 0.9f, 0.9f, 1),
154                 ImageShadow = new ImageShadow()
155                 {
156                     Url = FrameworkInformation.ResourcePath + "nui_component_default_popup_shadow.png",
157                     Border = new Rectangle(24, 24, 24, 24),
158                     Extents = new Vector2(48, 48)
159                 },
160                 Title = new TextLabelStyle()
161                 {
162                     PointSize = 16,
163                     Padding = new Extents(20, 20, 20, 20),
164                 },
165                 Buttons = new ButtonStyle()
166                 {
167                     SizeHeight = 80,
168                     CornerRadius = 0,
169                     BackgroundColor = new Selector<Color>()
170                     {
171                         Normal = new Color(1, 1, 1, 1),
172                         Pressed = new Color(1, 1, 1, 0.5f),
173                     },
174                     Overlay = new ImageViewStyle()
175                     {
176                         BackgroundColor = new Selector<Color>()
177                         {
178                             Pressed = new Color(0, 0, 0, 0.1f),
179                             Other = new Color(1, 1, 1, 0.1f),
180                         },
181                     },
182                     Text = new TextLabelStyle()
183                     {
184                         TextColor = new Color(0.05f, 0.63f, 0.9f, 1),
185                     }
186                 }
187             });
188
189             // Progress base style
190             theme.AddStyleWithoutClone("Tizen.NUI.Components.Progress", new ProgressStyle()
191             {
192                 Size = new Size(508, 16),
193                 Track = new ImageViewStyle()
194                 {
195                     CornerRadius = 8.0f,
196                     BackgroundColor = new Selector<Color>()
197                     {
198                         Normal = new Color(0.82f, 0.31f, 0.0f, 0.1f),
199                         Disabled = new Color(0.82f, 0.31f, 0.0f, 0.1f),
200                     },
201                 },
202                 Buffer = new ImageViewStyle()
203                 {
204                     CornerRadius = 8.0f,
205                     BackgroundColor = new Color(0.82f, 0.31f, 0.0f, 0.1f),
206                 },
207                 Progress = new ImageViewStyle()
208                 {
209                     CornerRadius = 8.0f,
210                     BackgroundColor = new Color("#D25000"),
211                 },
212                 IndeterminateImageUrl = FrameworkInformation.ResourcePath + "IoT_progress_indeterminate.png",
213             });
214
215             // RadioButton base style
216             theme.AddStyleWithoutClone("Tizen.NUI.Components.RadioButton", new ButtonStyle()
217             {
218                 Padding = new Extents(8, 8, 8, 8),
219                 ItemSpacing = new Size2D(16, 16),
220                 ItemHorizontalAlignment = HorizontalAlignment.Center,
221                 ItemVerticalAlignment = VerticalAlignment.Center,
222                 Icon = new ImageViewStyle()
223                 {
224                     Size = new Size(32, 32),
225                     ResourceUrl = new Selector<string>()
226                     {
227                         Normal = FrameworkInformation.ResourcePath + "IoT_radiobutton_off.png",
228                         Pressed = FrameworkInformation.ResourcePath + "IoT_radiobutton_off_p.png",
229                         Disabled = FrameworkInformation.ResourcePath + "IoT_radiobutton_off_d.png",
230                         Focused = FrameworkInformation.ResourcePath + "IoT_radiobutton_off_f.png",
231                         Selected = FrameworkInformation.ResourcePath + "IoT_radiobutton_on.png",
232                         SelectedPressed = FrameworkInformation.ResourcePath + "IoT_radiobutton_on_p.png",
233                         SelectedFocused = FrameworkInformation.ResourcePath + "IoT_radiobutton_on_f.png",
234                         DisabledSelected = FrameworkInformation.ResourcePath + "IoT_radiobutton_on_d.png",
235                     },
236                 },
237                 Text = new TextLabelStyle()
238                 {
239                     TextColor = new Selector<Color>()
240                     {
241                         Normal = new Color("#090E21"),
242                         Selected = new Color("#FF6200"),
243                         Disabled = new Color("#CACACA"),
244                     },
245                     PixelSize = 24,
246                 }
247             });
248
249             // Slider base style
250             theme.AddStyleWithoutClone("Tizen.NUI.Components.Slider", new SliderStyle()
251             {
252                 Size = new Size(850, 50),
253                 TrackThickness = 8,
254                 Track = new ImageViewStyle()
255                 {
256                     Size = new Size(800, 8),
257                     CornerRadius = 4.0f,
258                     BackgroundColor = new Selector<Color>()
259                     {
260                         Normal = new Color(1.0f, 0.37f, 0.0f, 0.1f),
261                         Disabled = new Color(1.0f, 0.37f, 0.0f, 0.1f),
262                     },
263                 },
264                 Progress = new ImageViewStyle()
265                 {
266                     Size = new Size(800, 8),
267                     CornerRadius = 4.0f,
268                     BackgroundColor = new Selector<Color>()
269                     {
270                         Normal = new Color("#FF6200"),
271                         Disabled = new Color("#CACACA"),
272                     },
273                 },
274                 Thumb = new ImageViewStyle()
275                 {
276                     WidthResizePolicy = ResizePolicyType.UseNaturalSize,
277                     HeightResizePolicy = ResizePolicyType.UseNaturalSize,
278                     ResourceUrl = new Selector<string>()
279                     {
280                         Normal = FrameworkInformation.ResourcePath + "IoT_slider_handler_normal.png",
281                         Pressed = FrameworkInformation.ResourcePath + "IoT_slider_handler_pressed.png",
282                         Focused = FrameworkInformation.ResourcePath + "IoT_slider_handler_pressed.png",
283                         Disabled = FrameworkInformation.ResourcePath + "IoT_slider_handler_disabled.png",
284                     },
285                 },
286                 ValueIndicatorImage = new ImageViewStyle()
287                 {
288                     SizeHeight = 40,
289                     WidthResizePolicy = ResizePolicyType.FitToChildren,
290                     Margin = new Extents(8, 8, 0, 0),
291                     BorderlineWidth = 1.0f,
292                     BorderlineColor = new Color("#FF6200"),
293                     BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.0f),
294                     CornerRadius = 12.0f,
295                 },
296                 ValueIndicatorText = new TextLabelStyle()
297                 {
298                     SizeHeight = 24,
299                     WidthResizePolicy = ResizePolicyType.UseNaturalSize,
300                     PixelSize = 16,
301                     TextColor = new Color("#FF6200"),
302                 }
303             });
304
305             // Switch base style
306             theme.AddStyleWithoutClone("Tizen.NUI.Components.Switch", new SwitchStyle()
307             {
308                 ItemSpacing = new Size2D(16, 16),
309                 ItemHorizontalAlignment = HorizontalAlignment.Begin,
310                 ItemVerticalAlignment = VerticalAlignment.Center,
311                 Track = new ImageViewStyle()
312                 {
313                     Size = new Size(84, 44),
314                     ResourceUrl = new Selector<string>()
315                     {
316                         Normal = FrameworkInformation.ResourcePath + "IoT_switch_track_off.png",
317                         Pressed = FrameworkInformation.ResourcePath + "IoT_switch_track_off_p.png",
318                         Disabled = FrameworkInformation.ResourcePath + "IoT_switch_track_off_d.png",
319                         Focused = FrameworkInformation.ResourcePath + "IoT_switch_track_off_f.png",
320                         Selected = FrameworkInformation.ResourcePath + "IoT_switch_track_on.png",
321                         SelectedPressed = FrameworkInformation.ResourcePath + "IoT_switch_track_on_p.png",
322                         SelectedFocused = FrameworkInformation.ResourcePath + "IoT_switch_track_on_f.png",
323                         DisabledSelected = FrameworkInformation.ResourcePath + "IoT_switch_track_on_d.png",
324                     },
325                 },
326                 Thumb = new ImageViewStyle()
327                 {
328                     Size = new Size(44, 44),
329                     ResourceUrl = new Selector<string>()
330                     {
331                         Normal = FrameworkInformation.ResourcePath + "IoT_switch_thumb.png",
332                         Disabled = FrameworkInformation.ResourcePath + "IoT_switch_thumb_d.png",
333                         Selected = FrameworkInformation.ResourcePath + "IoT_switch_thumb_s.png",
334                         SelectedPressed = FrameworkInformation.ResourcePath + "IoT_switch_thumb_sp.png",
335                         SelectedFocused = FrameworkInformation.ResourcePath + "IoT_switch_thumb_sf.png",
336                     }
337                 },
338                 Text = new TextLabelStyle()
339                 {
340                     TextColor = new Selector<Color>()
341                     {
342                         Normal = new Color("#090E21"),
343                         Disabled = new Color("#CACACA"),
344                     },
345                     PixelSize = 24,
346                 }
347             });
348
349             // Loading base style
350             theme.AddStyleWithoutClone("Tizen.NUI.Components.Loading", new LoadingStyle()
351             {
352                 LoadingSize = new Size(200, 200),
353             });
354
355             // Pagination base style
356             theme.AddStyleWithoutClone("Tizen.NUI.Components.Pagination", new PaginationStyle()
357             {
358                 Size = new Size(450, 24),
359                 IndicatorImageUrl = new Selector<string>()
360                 {
361                     Normal = FrameworkInformation.ResourcePath + "nui_component_default_pagination_normal_dot.png",
362                     Selected = FrameworkInformation.ResourcePath + "nui_component_default_pagination_focus_dot.png",
363                 },
364                 IndicatorSize = new Size(80, 24),
365                 IndicatorSpacing = 16,
366             });
367
368             // Scrollbar base style
369             theme.AddStyleWithoutClone("Tizen.NUI.Components.Scrollbar", new ScrollbarStyle()
370             {
371                 TrackThickness = 8,
372                 ThumbThickness = 8,
373                 TrackColor = new Color(0f, 0f, 0f, 0f),
374                 ThumbColor = new Color("#FFFEFE"),
375                 TrackPadding = 4,
376                 //7.0 UX no require image resource.
377                 Thumb = new ImageViewStyle()
378                 {
379                     CornerRadius = 4.0f,
380                     BoxShadow = new Shadow(8.0f, new Color(0.0f, 0.0f, 0.0f, 0.16f), new Vector2(0.0f, 2.0f)),
381                 }
382                 //ThumbVerticalImageUrl = FrameworkInformation.ResourcePath + "nui_component_default_scroll_vbar.#.png",
383                 //ThumbHorizontalImageUrl = FrameworkInformation.ResourcePath + "nui_component_default_scroll_hbar.#.png",
384             });
385
386             // LinearLayouter base style
387             theme.AddStyleWithoutClone("Tizen.NUI.Components.LinearLayouter", new ViewStyle()
388             {
389                 Padding = new Extents(0, 0, 0, 0)
390             });
391
392             // GridLayouter base style
393             theme.AddStyleWithoutClone("Tizen.NUI.Components.GridLayouter", new ViewStyle()
394             {
395                 Padding = new Extents(0, 0, 0, 0),
396             });
397
398             // ItemsLayouter base style
399             theme.AddStyleWithoutClone("Tizen.NUI.Components.ItemsLayouter", new ViewStyle()
400             {
401                 Padding = new Extents(0, 0, 0, 0),
402             });
403
404             // RecyclerViewItem base style
405             theme.AddStyleWithoutClone("Tizen.NUI.Components.RecyclerViewItem", new RecyclerViewItemStyle()
406             {
407                 BackgroundColor = new Selector<Color>()
408                 {
409                     Normal = new Color(1, 1, 1, 1),
410                     Pressed = new Color(0.85f, 0.85f, 0.85f, 1),
411                     Disabled = new Color(0.70f, 0.70f, 0.70f, 1),
412                     Selected = new Color(0.701f, 0.898f, 0.937f, 1),
413                 },
414             });
415
416             // DefaultLinearItem base style
417             theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultLinearItem", new DefaultLinearItemStyle()
418             {
419                 SizeHeight = 64,
420                 Padding = new Extents(16, 16, 0, 0),
421                 Margin = new Extents(0, 0, 0, 0),
422                 Label = new TextLabelStyle()
423                 {
424                     PixelSize = 24,
425                     Ellipsis = true,
426                     FontFamily = "SamsungOneUI600",
427                     TextColor = new Selector<Color>()
428                     {
429                         Normal = new Color("#090E21"),
430                         Pressed = new Color("#FF6200"),
431                         Disabled = new Color("#CACACA"),
432                         Selected = new Color("#FF6200"),
433                     },
434                     ThemeChangeSensitive = false
435                 },
436                 SubLabel = new TextLabelStyle()
437                 {
438                     PixelSize = 20,
439                     Ellipsis = true,
440                     FontFamily = "SamsungOneUI400",
441                     TextColor = new Selector<Color>()
442                     {
443                         Normal = new Color("#090E21"),
444                         Pressed = new Color("#FF6200"),
445                         Disabled = new Color("#CACACA"),
446                         Selected = new Color("#FF6200"),
447                     },
448                     ThemeChangeSensitive = false
449                 },
450                 Icon = new ViewStyle()
451                 {
452                     Margin = new Extents(0, 16, 0, 0)
453                 },
454                 Extra = new ViewStyle()
455                 {
456                     Margin = new Extents(16, 0, 0, 0)
457                 },
458             });
459
460             // DefaultGridItem base style
461             theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultGridItem", new DefaultGridItemStyle()
462             {
463                 ClippingMode = ClippingModeType.ClipChildren,
464                 Padding = new Extents(0, 0, 0, 0),
465                 Margin = new Extents(5, 5, 5, 5),
466                 CornerRadius = 12.0f,
467                 BackgroundColor = new Selector<Color>()
468                 {
469                     Normal = new Color("#FAFAFA"),
470                     Pressed = new Color(1f, 0.38f, 0, 0.2f),
471                     Disabled = new Color("#FAFAFA"),
472                     Selected = new Color(1f, 0.38f, 0, 0.2f),
473                 },
474                 Image = new ImageViewStyle()
475                 {
476                     //FIXME: Clip mode is not working on CornerRadius.
477                     CornerRadius = 12.0f,
478                     ClippingMode = ClippingModeType.ClipChildren,
479                 },
480                 Label = new TextLabelStyle()
481                 {
482                     SizeHeight = 24,
483                     PixelSize = 16,
484                     FontFamily = "SamsungOneUI400",
485                     LineWrapMode = LineWrapMode.Character,
486                     TextColor = new Selector<Color>()
487                     {
488                         Normal = new Color("#090E21"),
489                         Pressed = new Color("#FF6200"),
490                         Disabled = new Color("#CACACA"),
491                         Selected = new Color("#FF6200"),
492                     },
493                     ThemeChangeSensitive = false
494                 },
495                 Badge = new ViewStyle()
496                 {
497                     Margin = new Extents(0, 0, 0, 0),
498                 },
499                 BoxShadow = new Shadow(12.0f, new Color(0.0f, 0.0f, 0.0f, 0.16f), new Vector2(0.0f, 4.0f)),
500             });
501
502             // DefaultTitleItem base style
503             theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultTitleItem", new DefaultTitleItemStyle()
504             {
505                 SizeHeight = 48,
506                 Padding = new Extents(20, 20, 0, 0),
507                 Margin = new Extents(0, 0, 0, 0),
508                 BackgroundColor = Color.Transparent,
509                 Label = new TextLabelStyle()
510                 {
511                     PixelSize = 24,
512                     Ellipsis = true,
513                     FontFamily = "SamsungOneUI400",
514                     TextColor = new Color("#090E217F"),
515                     ThemeChangeSensitive = false
516                 },
517                 Icon = new ViewStyle()
518                 {
519                     Margin = new Extents(24, 0, 0, 0)
520                 },
521                 Seperator = new ViewStyle()
522                 {
523                     Margin = new Extents(0, 0, 0, 0),
524                     BackgroundColor = new Color(0, 0, 0, 0),
525                 },
526             });
527
528             // ContentPage base style
529             theme.AddStyleWithoutClone("Tizen.NUI.Components.ContentPage", new ViewStyle()
530             {
531                 BackgroundColor = new Color("#FAFAFA"),
532                 CornerRadius = new Vector4(24.0f, 24.0f, 24.0f ,24.0f),
533                 CornerRadiusPolicy = VisualTransformPolicyType.Absolute,
534                 BoxShadow = new Shadow(8.0f, new Color(0.0f, 0.0f, 0.0f, 0.16f), new Vector2(0.0f, 2.0f)),
535             });
536
537             // AppBar base style
538             theme.AddStyleWithoutClone("Tizen.NUI.Components.AppBar", new AppBarStyle()
539             {
540                 Size = new Size(-1, 64),
541                 BackgroundColor = Color.Transparent,
542                 BackButton = new ButtonStyle()
543                 {
544                     Size = new Size(48, 48),
545                     CornerRadius = 0,
546                     BackgroundColor = Color.Transparent,
547                     Icon = new ImageViewStyle()
548                     {
549                         Size = new Size(48, 48),
550                         ResourceUrl = FrameworkInformation.ResourcePath + "nui_component_default_back_button.png",
551                         Color = new Selector<Color>()
552                         {
553                             Normal = new Color("#17234D"),
554                             Focused = new Color("#17234D"),
555                             Pressed = new Color("#FF6200"),
556                             Disabled = new Color("#CACACA"),
557                         },
558                     },
559                     ThemeChangeSensitive = false
560                 },
561                 TitleTextLabel = new TextLabelStyle()
562                 {
563                     PixelSize = 24,
564                     VerticalAlignment = VerticalAlignment.Center,
565                     TextColor = new Selector<Color>()
566                     {
567                         Normal = new Color("#17234D"),
568                     },
569                     ThemeChangeSensitive = false
570                 },
571                 ActionView = new ViewStyle()
572                 {
573                     Size = new Size(48, 64),
574                     CornerRadius = 0,
575                     BackgroundColor = Color.Transparent,
576                 },
577                 ActionButton = new ButtonStyle()
578                 {
579                     Size = new Size(-2, 64),
580                     CornerRadius = 0,
581                     BackgroundColor = Color.Transparent,
582                     Text = new TextLabelStyle()
583                     {
584                         PixelSize = 24,
585                         TextColor = new Selector<Color>()
586                         {
587                             Normal = new Color("#FF6200"),
588                             Focused = new Color("#FF6200"),
589                             Pressed = new Color("#D95300"),
590                             Disabled = new Color("#CACACA"),
591                         },
592                     },
593                     Icon = new ImageViewStyle()
594                     {
595                         Size = new Size(48, 48),
596                         Color = new Selector<Color>()
597                         {
598                             Normal = new Color("#17234D"),
599                             Focused = new Color("#17234D"),
600                             Pressed = new Color("#FF6200"),
601                             Disabled = new Color("#CACACA"),
602                         },
603                     },
604                     ThemeChangeSensitive = false,
605                 },
606                 Padding = new Extents(16, 16, 0, 0),
607                 NavigationPadding = new Extents(0, 8, 0, 0),
608                 ActionPadding = new Extents(16, 0, 0, 0),
609                 ActionCellPadding = new Size2D(16, 0),
610             });
611
612             // Picker base style
613             theme.AddStyleWithoutClone("Tizen.NUI.Components.Picker", new PickerStyle()
614             {
615                 SizeHeight = 220.0f,
616                 MinimumSize = new Size(80, -1),
617                 ItemTextLabel = new TextLabelStyle()
618                 {
619                     PixelSize = 24,
620                     VerticalAlignment = VerticalAlignment.Center,
621                     HorizontalAlignment = HorizontalAlignment.Center,
622                     SizeHeight = 44,
623                     TextColor = new Selector<Color>()
624                     {
625                         Normal = new Color(0.035f, 0.055f, 0.123f, 1.0f),
626                     },
627                     BackgroundColor = new Color("#FAFAFA"),
628                 },
629                 StartScrollOffset = new Size(0, 0),
630             });
631
632             // TabBar base style
633             theme.AddStyleWithoutClone("Tizen.NUI.Components.TabBar", new ViewStyle()
634             {
635                 Size = new Size(-1, -2),
636                 Margin = new Extents(16, 16, 0, 0),
637                 Padding = new Extents(14, 14, 0, 0),
638                 CornerRadius = new Vector4(12.0f, 12.0f, 12.0f, 12.0f),
639                 CornerRadiusPolicy = VisualTransformPolicyType.Absolute,
640                 BoxShadow = new Shadow(8.0f, new Color(0.0f, 0.0f, 0.0f, 0.16f), new Vector2(0.0f, 2.0f)),
641                 BackgroundColor = new Color("#FAFAFA"),
642             });
643
644             // TabButton base style
645             theme.AddStyleWithoutClone("Tizen.NUI.Components.TabButton", new TabButtonStyle()
646             {
647                 Size = new Size(-1, 72),
648                 SizeWithIcon = new Size(-1, 116),
649                 SizeWithIconOnly = new Size(-1, 64),
650                 MinimumSize = new Size(80, 64),
651                 Padding = new Extents(24, 24, 16, 16),
652                 ItemSpacing = new Size2D(10, 10),
653                 CornerRadius = 0,
654                 IconSizeWithIconOnly = new Size(32, 32),
655                 TextSizeWithIcon = 16.0f,
656                 BackgroundColor = new Selector<Color>()
657                 {
658                     Selected = new Color("#FFE0CC"),
659                     Pressed = new Color("#FFCAA8"),
660                     Other = new Color("#FAFAFA"),
661                 },
662                 Text = new TextLabelStyle()
663                 {
664                     PixelSize = 24,
665                     Size = new Size(-2, -2),
666                     TextColor = new Selector<Color>()
667                     {
668                         Normal = new Color("#090E21"),
669                         Disabled = new Color("#CACACA"),
670                         Other = new Color("#FF6200"),
671                     },
672                     ThemeChangeSensitive = false,
673                 },
674                 Icon = new ImageViewStyle()
675                 {
676                     Size = new Size(48, 48),
677                     Color = new Selector<Color>()
678                     {
679                         Normal = new Color("#090E21"),
680                         Disabled = new Color("#CACACA"),
681                         Other = new Color("#FF6200"),
682                     },
683                 },
684             });
685
686             // NotificationToast base style
687             theme.AddStyleWithoutClone("NotificationToast", new TextLabelStyle()
688             {
689                 BackgroundColor = new Color("#FAFAFA"),
690                 CornerRadius = 12.0f,
691                 BoxShadow = new Shadow(8.0f, new Color(0.0f, 0.0f, 0.0f, 0.16f), new Vector2(0.0f, 2.0f)),
692                 TextColor = new Color("#090E21"),
693                 PixelSize = 24,
694                 WidthResizePolicy = ResizePolicyType.UseNaturalSize,
695                 HeightResizePolicy = ResizePolicyType.UseNaturalSize,
696                 PositionUsesPivotPoint = true,
697                 HorizontalAlignment = HorizontalAlignment.Center,
698                 VerticalAlignment = VerticalAlignment.Center,
699                 Padding = new Extents(16, 16, 16, 16),
700                 PositionY = 120,
701             });
702
703             // AlertDialog base style
704             theme.AddStyleWithoutClone("Tizen.NUI.Components.AlertDialog", new AlertDialogStyle()
705             {
706                 Size = new Size(-2, -2),
707                 Padding = new Extents(32, 32, 32, 32),
708                 ItemSpacing = new Size2D(0, 32),
709                 BackgroundColor = new Color("#FAFAFA"),
710                 CornerRadius = 12.0f,
711                 BoxShadow = new Shadow(8.0f, new Color(0.0f, 0.0f, 0.0f, 0.16f), new Vector2(0.0f, 2.0f)),
712                 TitleTextLabel = new TextLabelStyle()
713                 {
714                     Size = new Size(626, -2),
715                     PixelSize = 24,
716                     HorizontalAlignment = HorizontalAlignment.Center,
717                     VerticalAlignment = VerticalAlignment.Center,
718                     TextColor = new Color("#090E21"),
719                     ThemeChangeSensitive = false,
720                 },
721                 MessageTextLabel = new TextLabelStyle()
722                 {
723                     Size = new Size(626, -2),
724                     PixelSize = 24,
725                     MultiLine = true,
726                     HorizontalAlignment = HorizontalAlignment.Center,
727                     VerticalAlignment = VerticalAlignment.Center,
728                     TextColor = new Color("#090E21"),
729                     ThemeChangeSensitive = false,
730                 },
731                 ActionContent = new ViewStyle()
732                 {
733                     Size = new Size(626, -2),
734                 },
735             });
736
737             // TimePicker base style
738             theme.AddStyleWithoutClone("Tizen.NUI.Components.TimePicker", new TimePickerStyle()
739             {
740                 CellPadding = new Size(12, 220),
741
742                 Pickers = new PickerStyle()
743                 {
744                     Size = new Size(80, 220),
745                     ItemTextLabel = new TextLabelStyle()
746                     {
747                         PixelSize = 24,
748                         VerticalAlignment = VerticalAlignment.Center,
749                         HorizontalAlignment = HorizontalAlignment.Center,
750                         SizeHeight = 44,
751                         TextColor = new Selector<Color>()
752                         {
753                             Normal = new Color(0.035f, 0.055f, 0.123f, 1.0f),
754                         },
755                         BackgroundColor = new Color("#FAFAFA"),
756                         ThemeChangeSensitive = false
757                     },
758                     StartScrollOffset = new Size2D(0, 0),
759                 }
760             });
761
762             // DatePicker base style
763             theme.AddStyleWithoutClone("Tizen.NUI.Components.DatePicker", new DatePickerStyle()
764             {
765                 CellPadding = new Size(12, 220),
766
767                 Pickers = new PickerStyle()
768                 {
769                     Size = new Size(80, 220),
770                     ItemTextLabel = new TextLabelStyle()
771                     {
772                         PixelSize = 24,
773                         VerticalAlignment = VerticalAlignment.Center,
774                         HorizontalAlignment = HorizontalAlignment.Center,
775                         SizeHeight = 44,
776                         TextColor = new Selector<Color>()
777                         {
778                             Normal = new Color(0.035f, 0.055f, 0.123f, 1.0f),
779                         },
780                         BackgroundColor = new Color("#FAFAFA"),
781                         ThemeChangeSensitive = false
782                     },
783                     StartScrollOffset = new Size2D(0, 0),
784                 }
785             });
786
787             // Menu base style
788             theme.AddStyleWithoutClone("Tizen.NUI.Components.Menu", new MenuStyle()
789             {
790                 BackgroundColor = Color.Transparent,
791                 Content = new ViewStyle()
792                 {
793                     BackgroundColor = new Color("#FFFEFE"),
794                     CornerRadius = 24.0f,
795                     BoxShadow = new Shadow(8.0f, new Color(0.0f, 0.0f, 0.0f, 0.16f), new Vector2(0.0f, 2.0f)),
796                     // FIXME: ScrollableBase with LinearLayout's Padding.Start is applied both Start and End.
797                     //        ScrollableBase with LinearLayout's Padding.Top is applied both Top and Bottom.
798                     Padding = new Extents(32, 0, 16, 0),
799                 },
800             });
801
802             // MenuItem base style
803             theme.AddStyleWithoutClone("Tizen.NUI.Components.MenuItem", new ButtonStyle()
804             {
805                 Size = new Size(324, -2),
806                 MinimumSize = new Size2D(0, 64),
807                 BackgroundColor = new Color("#FFFEFE"),
808                 CornerRadius = 0,
809                 // FIXME: ClippingModeType.ClipChildren cannot support anti-aliasing
810                 //        So not to show left bottom corner of MenuItem, MenuItem.Padding.Start is 0 and Menu.Content.Padding.Start is 32.
811                 //        (instead of MenuItem.Padding.Start 16 and Menu.Content.Padding.Start is 16)
812                 Padding = new Extents(0, 0, 24, 24),
813                 Text = new TextLabelStyle()
814                 {
815                     PixelSize = 24,
816                     MultiLine = true,
817                     HorizontalAlignment = HorizontalAlignment.Begin,
818                     VerticalAlignment = VerticalAlignment.Center,
819                     TextColor = new Selector<Color>()
820                     {
821                         Normal = new Color("#090E21"),
822                         Focused = new Color("#FF6200"),
823                         Pressed = new Color("#FF6200"),
824                         Disabled = new Color("#CACACA"),
825                         Selected = new Color("#FF6200"),
826                     },
827                     ThemeChangeSensitive = false
828                 },
829                 Icon = new ImageViewStyle()
830                 {
831                     Color = new Selector<Color>()
832                     {
833                         Normal = new Color("#090E21"),
834                         Focused = new Color("#FF6200"),
835                         Pressed = new Color("#FF6200"),
836                         Disabled = new Color("#CACACA"),
837                         Selected = new Color("#FF6200"),
838                     },
839                 },
840             });
841
842             // AlertDialog base style
843             theme.AddStyleWithoutClone("Tizen.NUI.Components.DialogPage.Scrim", new ViewStyle()
844             {
845                 BackgroundColor = new Color("#090E21"),
846                 Opacity = 0.5f,
847             });
848
849             return theme;
850         }
851     }
852 }
853
854 #endif // !PROFILE_WEARABLE