7548652d34db990fafa58e405a04c4f489a1e26e
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Wearable / src / public / Style / WearableButtonStyle.cs
1 /*
2  * Copyright(c) 2020 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 using System.ComponentModel;
18 using Tizen.NUI.BaseComponents;
19 using Tizen.NUI.Components;
20
21 namespace Tizen.NUI.Wearable
22 {
23     /// <summary>
24     /// A predefined style class for Wearable buttons.
25     /// </summary>
26     [EditorBrowsable(EditorBrowsableState.Never)]
27     public class WearableButtonStyle : ButtonStyle
28     {
29         /// <summary>
30         /// Creates a new class instance.
31         /// </summary>
32         [EditorBrowsable(EditorBrowsableState.Never)]
33         public WearableButtonStyle() : base()
34         {
35             Size = new Size(210, 72);
36             CornerRadius = 36;
37             BackgroundColor = new Selector<Color>
38             {
39                 Normal = new Color(0, 42f/255f, 77f/255f, 0.85f),
40                 Pressed = new Color(0, 70f/255f, 128f/255f, 0.70f),
41                 Disabled = new Color(61f/255f, 61f/255f, 61f/255f, 0.85f),
42             };
43             Text = new TextLabelStyle
44             {
45                 FontFamily = "SamsungOne 700",
46                 PixelSize = 28,
47                 TextColor = new Selector<Color>
48                 {
49                     Normal = new Color(56f/255f, 164f/255f, 252f/255f, 1),
50                     Pressed = new Color(56f/255f, 164f/255f, 252f/255f, 1),
51                     Disabled = new Color(1, 1, 1, 0.35f),
52                 },
53                 Padding = new Extents(20, 20, 0, 0),
54                 VerticalAlignment = VerticalAlignment.Center,
55                 HorizontalAlignment = HorizontalAlignment.Center,
56             };
57             Opacity = new Selector<float?>
58             {
59                 Other = 1.0f,
60                 Pressed = 0.6f,
61                 Disabled = 0.3f,
62             };
63         }
64     }
65 }