• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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  */
15 
16 #include "core/components/theme/theme_attributes.h"
17 
18 namespace OHOS::Ace {
19 
20 // theme attributes
21 const char THEME_ATTR_BG_COLOR[] = "bg_color";
22 
23 // component patterns
24 const char THEME_PATTERN_BUTTON[] = "button_pattern";
25 const char THEME_PATTERN_CHECKBOX[] = "checkbox_pattern";
26 const char THEME_PATTERN_DATA_PANEL[] = "data_panel_pattern";
27 const char THEME_PATTERN_RADIO[] = "radio_pattern";
28 const char THEME_PATTERN_SWIPER[] = "swiper_pattern";
29 const char THEME_PATTERN_SWITCH[] = "switch_pattern";
30 const char THEME_PATTERN_TOOLBAR[] = "toolbar_pattern";
31 const char THEME_PATTERN_TOGGLE[] = "toggle_pattern";
32 const char THEME_PATTERN_TOAST[] = "toast_pattern";
33 const char THEME_PATTERN_DIALOG[] = "dialog_pattern";
34 const char THEME_PATTERN_DRAG_BAR[] = "drag_bar_pattern";
35 const char THEME_PATTERN_SEMI_MODAL[] = "semi_modal_pattern";
36 const char THEME_PATTERN_BADGE[] = "badge_pattern";
37 const char THEME_PATTERN_CALENDAR[] = "calendar_pattern";
38 const char THEME_PATTERN_CAMERA[] = "camera_pattern";
39 const char THEME_PATTERN_CLOCK[] = "clock_pattern";
40 const char THEME_PATTERN_COUNTER[] = "counter_pattern";
41 const char THEME_PATTERN_DIVIDER[] = "divider_pattern";
42 const char THEME_PATTERN_FOCUS_ANIMATION[] = "focus_animation_pattern";
43 const char THEME_PATTERN_GRID[] = "grid_pattern";
44 const char THEME_PATTERN_ICON[] = "icon_pattern";
45 const char THEME_PATTERN_IMAGE[] = "image_pattern";
46 const char THEME_PATTERN_LIST[] = "list_pattern";
47 const char THEME_PATTERN_LIST_ITEM[] = "list_item_pattern";
48 const char THEME_PATTERN_MARQUEE[] = "marquee_pattern";
49 const char THEME_PATTERN_NAVIGATION_BAR[] = "navigation_bar_pattern";
50 const char THEME_PATTERN_PICKER[] = "picker_pattern";
51 const char THEME_PATTERN_PIECE[] = "piece_pattern";
52 const char THEME_PATTERN_POPUP[] = "popup_pattern";
53 const char THEME_PATTERN_PROGRESS[] = "progress_pattern";
54 const char THEME_PATTERN_QRCODE[] = "qrcode_pattern";
55 const char THEME_PATTERN_RATING[] = "rating_pattern";
56 const char THEME_PATTERN_REFRESH[] = "refresh_pattern";
57 const char THEME_PATTERN_SCROLL_BAR[] = "scroll_bar_pattern";
58 const char THEME_PATTERN_SEARCH[] = "search_pattern";
59 const char THEME_PATTERN_STEPPER[] = "stepper_pattern";
60 const char THEME_PATTERN_TAB[] = "tab_pattern";
61 const char THEME_PATTERN_SELECT[] = "select_pattern";
62 const char THEME_PATTERN_SLIDER[] = "slider_pattern";
63 const char THEME_PATTERN_TEXT[] = "text_pattern";
64 const char THEME_PATTERN_TEXTFIELD[] = "textfield_pattern";
65 const char THEME_PATTERN_TEXT_OVERLAY[] = "text_overlay_pattern";
66 const char THEME_PATTERN_VIDEO[] = "video_pattern";
67 const char THEME_PATTERN_INDEXER[] = "indexer_pattern";
68 const char THEME_PATTERN_APP_BAR[] = "app_bar_pattern";
69 
70 // pattern general attributes
71 const char PATTERN_FG_COLOR[] = "fg_color";
72 const char PATTERN_BG_COLOR[] = "bg_color";
73 const char PATTERN_BG_COLOR_HOVERED[] = "bg_color_hovered";
74 const char PATTERN_BG_COLOR_CLICKED[] = "bg_color_clicked";
75 const char PATTERN_BG_COLOR_PRESSED[] = "bg_color_pressed";
76 const char PATTERN_BG_COLOR_SELECTED[] = "bg_color_selected";
77 const char PATTERN_BG_COLOR_FOCUSED[] = "bg_color_focused";
78 const char PATTERN_BG_COLOR_DISABLED_ALPHA[] = "bg_color_disabled_alpha";
79 const char PATTERN_BG_COLOR_ALPHA[] = "bg_color_alpha";
80 const char PATTERN_TEXT_COLOR[] = "text_color";
81 const char PATTERN_TEXT_COLOR_ALPHA[] = "text_color_alpha";
82 const char PATTERN_TEXT_COLOR_FOCUSED[] = "text_color_focused";
83 const char PATTERN_TEXT_COLOR_SELECTED[] = "text_color_selected";
84 const char PATTERN_TEXT_COLOR_DISABLED[] = "text_color_disabled";
85 const char PATTERN_TEXT_SIZE[] = "text_font_size";
86 const char PATTERN_WIDTH[] = "width";
87 const char PATTERN_HEIGHT[] = "height";
88 
89 // pattern attributes for checkable
90 const char SWITCH_WIDTH[] = "switch_width";
91 const char SWITCH_HEIGHT[] = "switch_height";
92 const char SWITCH_SHADOW_WIDTH[] = "switch_shadow_width";
93 const char RADIO_WIDTH[] = "radio_width";
94 const char SWITCH_HORIZONTAL_PADDING[] = "switch_horizontal_padding";
95 const char SWITCH_VERTICAL_PADDING[] = "switch_vertical_padding";
96 const char RADIO_PADDING[] = "radio_padding";
97 
98 // data panel attributes
99 const char DATA_PANEL_COLOR_1_START[] = "rainbow_fg_color_1_start";
100 const char DATA_PANEL_COLOR_2_START[] = "rainbow_fg_color_2_start";
101 const char DATA_PANEL_COLOR_3_START[] = "rainbow_fg_color_3_start";
102 const char DATA_PANEL_COLOR_4_START[] = "rainbow_fg_color_4_start";
103 const char DATA_PANEL_COLOR_5_START[] = "rainbow_fg_color_5_start";
104 const char DATA_PANEL_COLOR_6_START[] = "rainbow_fg_color_6_start";
105 const char DATA_PANEL_COLOR_7_START[] = "rainbow_fg_color_7_start";
106 const char DATA_PANEL_COLOR_8_START[] = "rainbow_fg_color_8_start";
107 const char DATA_PANEL_COLOR_9_START[] = "rainbow_fg_color_9_start";
108 const char DATA_PANEL_COLOR_1_END[] = "rainbow_fg_color_1_end";
109 const char DATA_PANEL_COLOR_2_END[] = "rainbow_fg_color_2_end";
110 const char DATA_PANEL_COLOR_3_END[] = "rainbow_fg_color_3_end";
111 const char DATA_PANEL_COLOR_4_END[] = "rainbow_fg_color_4_end";
112 const char DATA_PANEL_COLOR_5_END[] = "rainbow_fg_color_5_end";
113 const char DATA_PANEL_COLOR_6_END[] = "rainbow_fg_color_6_end";
114 const char DATA_PANEL_COLOR_7_END[] = "rainbow_fg_color_7_end";
115 const char DATA_PANEL_COLOR_8_END[] = "rainbow_fg_color_8_end";
116 const char DATA_PANEL_COLOR_9_END[] = "rainbow_fg_color_9_end";
117 const char DATA_PANEL_LOADING_COLOR_START[] = "loading_fg_color_start";
118 const char DATA_PANEL_LOADING_COLOR_END[] = "loading_fg_color_end";
119 const char DATA_PANEL_PROGRESS_COLOR_START[] = "progress_fg_color_start";
120 const char DATA_PANEL_PROGRESS_COLOR_END[] = "progress_fg_color_end";
121 
122 // pattern attributes for toggle
123 const char DIALOG_CONTENT_TOP_PADDING[] = "dialog_content_top_padding";
124 const char DIALOG_TITLE_TOP_PADDING[] = "dialog_title_top_padding";
125 const char DIALOG_BUTTON_HEIGHT[] = "dialog_button_height";
126 const char DIALOG_TITLE_MAX_LINES[] = "dialog_title_max_lines";
127 const char DIALOG_COMMON_BUTTON_TEXT_COLOR[] = "dialog_common_button_text_color";
128 const char DIALOG_MIN_BUTTON_TEXT_SIZE[] = "dialog_min_button_text_size";
129 const char DIALOG_MAX_BUTTON_WIDTH[] = "dialog_max_button_width";
130 const char DIALOG_MIN_BUTTON_WIDTH[] = "dialog_min_button_width";
131 const char DIALOG_ACTIONS_TOP_PADDING[] = "dialog_actions_top_padding";
132 const char DIALOG_MASK_COLOR_END[] = "dialog_mask_color_end";
133 
134 // pattern attributes for drag bar
135 const char DRAG_BAR_COLOR[] = "drag_bar_color";
136 
137 // pattern attributes for popup
138 const char POPUP_BORDER_RADIUS[] = "popup_border_radius";
139 const char POPUP_HORIZONTAL_PADDING[] = "popup_horizontal_padding";
140 const char POPUP_VERTICAL_PADDING[] = "popup_vertical_padding";
141 const char POPUP_BUTTON_TEXT_FONT_SIZE[] = "popup_button_text_font_size";
142 } // namespace OHOS::Ace
143