• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15export class PresetStyleConstants {
16  //----------- default constants----------
17
18  /**
19    * CommonDialog width
20   */
21  static readonly DEFAULT_COMMONDIALOG_WIDTH = '';
22
23  /**
24   * systemUI top height
25   */
26  static readonly DEFAULT_SYS_TOP_HEIGHT = 44;
27
28  /**
29   * systemUI bottom height
30   */
31  static readonly DEFAULT_SYS_BOTTOM_HEIGHT = 44;
32
33  /**
34   * pad system ui height
35   */
36  static readonly DEFAULT_PAD_SYSTEM_UI = 88;
37
38  /**
39   * phone system ui height
40   */
41  static readonly DEFAULT_PHONE_SYSTEM_UI = 132;
42
43  /**
44   * desktop indicator height
45   */
46  static readonly DEFAULT_PAD_INDICATOR_HEIGHT = 32;
47
48  /**
49   * desktop indicator height
50   */
51  static readonly DEFAULT_PHONE_INDICATOR_HEIGHT = 32;
52
53  /**
54   * columns of screen with phone
55   */
56  static readonly DEFAULT_PHONE_GRID_APP_COLUMNS = 4;
57
58  /**
59   * columns of screen with pad
60   */
61  static readonly DEFAULT_PAD_GRID_APP_COLUMNS = 12;
62
63  /**
64   * threshold value of dock isShow recent dock
65   */
66  static readonly DEFAULT_DOCK_RECENT_WIDTH = 520;
67
68  /**
69   * padding top of icon
70   */
71  static readonly DEFAULT_ICON_PADDING_TOP = 0;
72
73  /**
74   *  padding left of icon
75   */
76  static readonly DEFAULT_ICON_PADDING_LEFT = 21;
77
78  /**
79   * icon size
80   */
81  static readonly DEFAULT_ICON_SIZE = 54;
82
83  /**
84   * text lines height
85   */
86  static readonly DEFAULT_TEXT_LINES = 36;
87
88  /**
89   * padding of app center
90   */
91  static readonly DEFAULT_APP_CENTER_PADDING = 100;
92
93  /**
94   * screen grid margin and gap
95   */
96  static readonly DEFAULT_SCREEN_GRID_GAP_AND_MARGIN = 12;
97
98  //----------- desktop layout-------------
99  /**
100   * desktop item size
101   */
102  static readonly DEFAULT_APP_LAYOUT_SIZE = 96;
103
104  /**
105   * desktop container margin
106   */
107  static readonly DEFAULT_LAYOUT_MARGIN = 82;
108
109  /**
110   * desktop container minimum gutter
111   */
112  static readonly DEFAULT_APP_LAYOUT_MIN_GUTTER = 6;
113
114  //----------- desktop icon-------------
115  /**
116   * desktop item padding top
117   */
118  static readonly DEFAULT_APP_TOP_RATIO = 0;
119
120  /**
121   * desktop item name lines
122   */
123  static readonly DEFAULT_APP_NAME_LINES = 2;
124
125  /**
126   * desktop item name size
127   */
128  static readonly DEFAULT_APP_NAME_TEXT_SIZE  = 18;
129
130  /**
131   * desktop item icon and name gap
132   */
133  static readonly DEFAULT_ICON_NAME_GAP = 4;
134
135  /**
136   * desktop icon name height
137   */
138  static readonly DEFAULT_DESKTOP_NAME_HEIGHT = 36;
139
140  /**
141   * desktop icon name margin
142   */
143  static readonly DEFAULT_DESKTOP_NAME_MARGIN = 3;
144
145  //----------- desktop folder-----------
146  /**
147   * folder gutter with container size
148   */
149  static readonly DEFAULT_FOLDER_GUTTER_RATIO = 0.06;
150
151  /**
152   * folder padding with container size
153   */
154  static readonly DEFAULT_FOLDER_PADDING_RATIO = 0.1;
155
156  //----------- desktop open --------------
157  /**
158   * gutter of open folder
159   */
160  static readonly DEFAULT_OPEN_FOLDER_GUTTER = 12;
161
162  /**
163   * padding of open folder
164   */
165  static readonly DEFAULT_OPEN_FOLDER_PADDING = 16;
166
167  /**
168   * margin top of open folder
169   */
170  static readonly DEFAULT_OPEN_FOLDER_MARGIN_TOP = 188;
171
172  /**
173   * margin top of open folder
174   */
175  static readonly DEFAULT_OPEN_FOLDER_TITLE_TOP = 40;
176
177  //----------- folder add list ------------------
178  /**
179   * max height of container
180   */
181  static readonly DEFAULT_FOLDER_ADD_MAX_HEIGHT = 0.6;
182
183  /**
184   * margin of container
185   */
186  static readonly DEFAULT_FOLDER_ADD_MARGIN = 12;
187
188  /**
189   * gutter of container
190   */
191  static readonly DEFAULT_FOLDER_ADD_GAP = 12;
192
193  /**
194   * toggle of item
195   */
196  static readonly DEFAULT_APP_GRID_TOGGLE_SIZE = 16;
197
198  /**
199   * icon padding of item with item size
200   */
201  static readonly DEFAULT_FOLDER_ADD_ICON_TOP_RATIO = 0.1;
202
203  /**
204   * name size of container
205   */
206  static readonly DEFAULT_FOLDER_ADD_GRID_TEXT_SIZE = 16;
207
208  /**
209   * title size of container
210   */
211  static readonly DEFAULT_FOLDER_ADD_TITLE_TEXT_SIZE = 20;
212
213  /**
214   * name lines of item
215   */
216  static readonly DEFAULT_FOLDER_ADD_TEXT_LINES = 2;
217
218  /**
219   * button size of container
220   */
221  static readonly DEFAULT_FOLDER_ADD_BUTTON_SIZE = 24;
222
223  //----------- app center--------------
224  /**
225   * margin left of app center
226   */
227  static readonly DEFAULT_APP_CENTER_MARGIN = 218;
228
229  /**
230   * gutter of app center
231   */
232  static readonly DEFAULT_APP_CENTER_GUTTER = 12;
233
234  /**
235   * item size of app center
236   */
237  static readonly DEFAULT_APP_CENTER_SIZE = 112;
238
239  /**
240   * icon padding top with item size
241   */
242  static readonly DEFAULT_APP_CENTER_TOP_RATIO = 0;
243
244  /**
245   * name lines of app center
246   */
247  static readonly DEFAULT_APP_CENTER_NAME_LINES = 2;
248
249  /**
250   * name size of app center
251   */
252  static readonly DEFAULT_APP_CENTER_NAME_TEXT_SIZE = 18;
253
254  //----------- dock----------------
255  /**
256   * icon size of dock
257   */
258  static readonly DEFAULT_DOCK_ICON_SIZE = 54;
259
260  /**
261   * padding of dock
262   */
263  static readonly DEFAULT_DOCK_PADDING = 12;
264
265  /**
266   * gap of dock container
267   */
268  static readonly DEFAULT_DOCK_ITEM_GAP = 8;
269
270  /**
271   * gap with resident and recent
272   */
273  static readonly DEFAULT_DOCK_GUTTER = 12;
274
275  /**
276   * save margin of dock
277   */
278  static readonly DEFAULT_DOCK_SAVE_MARGIN = 24;
279
280  /**
281   * margin bottom of dock
282   */
283  static readonly DEFAULT_DOCK_MARGIN_BOTTOM = 10;
284
285  /**
286   * margin bottom of dock(Immersive navigation bar)
287   */
288  static readonly DEFAULT_DOCK_MARGIN_BOTTOM_HIDE_BAR = 10;
289}