1 /*
2  * Copyright (c) 2021-2023 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 #ifndef FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_CALENDAR_CALENDAR_THEME_H
17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_CALENDAR_CALENDAR_THEME_H
18 
19 #include "base/geometry/dimension.h"
20 #include "core/components/common/properties/color.h"
21 #include "core/components/theme/theme.h"
22 #include "core/components/theme/theme_constants.h"
23 #include "core/components/theme/theme_constants_defines.h"
24 
25 namespace OHOS::Ace {
26 namespace {
27 
28 constexpr Color DEFAULT_DAY_COLOR = Color(0xE1181819);
29 constexpr Color DEFAULT_NON_CURRENT_MONTH_DAY_COLOR = Color(0x4B181819);
30 constexpr Color DEFAULT_WEEKEND_DAY_COLOR = Color(0x7D181819);
31 constexpr Color DEFAULT_WEEKEND_LUNAR_COLOR = Color(0x7D181819);
32 constexpr Color DEFAULT_NON_CURRENT_MONTH_LUNAR_COLOR = Color(0x75181819);
33 constexpr Color DEFAULT_LUNAR_COLOR = Color(0x96181819);
34 constexpr Color DEFAULT_CALENDAR_WEEK_COLOR = Color(0xffa0a1a5);
35 constexpr Color DEFAULT_CALENDAR_DAY_COLOR = Color(0xffeaebed);
36 constexpr Color DEFAULT_CALENDAR_LUNAR_COLOR = Color(0xffa0a1a5);
37 constexpr Color DEFAULT_CALENDAR_WEEKEND_DAY_COLOR = Color(0xff808080);
38 constexpr Color DEFAULT_CALENDAR_WEEKEND_LUNAR_COLOR = Color(0xff808080);
39 constexpr Color DEFAULT_CALENDAR_TODAY_DAY_FOCUS_COLOR = Color(0xffffffff);
40 constexpr Color DEFAULT_CALENDAR_TODAY_LUNAR_FOCUS_COLOR = Color(0xffffffff);
41 constexpr Color DEFAULT_CALENDAR_TODAY_DAY_UNFOCUS_COLOR = Color(0xff0a59f7);
42 constexpr Color DEFAULT_CALENDAR_TODAY_LUNAR_UNFOCUS_COLOR = Color(0xff0a59f7);
43 constexpr Color DEFAULT_CALENDAR_WORK_MARK_COLOR = Color(0xffe84026);
44 constexpr Color DEFAULT_CALENDAR_OFF_MARK_COLOR = Color(0xff0a59f7);
45 constexpr Color DEFAULT_CALENDAR_NONCURRENT_MONTH_WORK_MARK_COLOR = Color(0x33e84026);
46 constexpr Color DEFAULT_CALENDAR_NONCURRENT_MONTH_OFF_MARK_COLOR = Color(0x330a59f7);
47 constexpr Color DEFAULT_CALENDAR_NONCURRENT_MONTH_DAY_COLOR = Color(0xff555e6b);
48 constexpr Color DEFAULT_CALENDAR_NONCURRENT_MONTH_LUNAR_COLOR = Color(0xff555e6b);
49 constexpr Color DEFAULT_CALENDAR_FOCUS_AREA_BACKGROUND_COLOR = Color(0xff5ea1ff);
50 constexpr Color DEFAULT_CALENDAR_BLUR_AREA_BACKGROUND_COLOR = Color(0xffffffff);
51 } // namespace
52 
53 struct CalendarThemeStructure {
54     std::string dayFontWeight = "500";
55     std::string lunarDayFontWeight = "500";
56     std::string workStateFontWeight = "500";
57     std::string monday;
58     std::string tuesday;
59     std::string wednesday;
60     std::string thursday;
61     std::string friday;
62     std::string saturday;
63     std::string sunday;
64     Color weekColor;
65     Color dayColor;
66     Color lunarColor;
67     Color weekendDayColor;
68     Color weekendLunarColor;
69     Color todayColor;
70     Color todayLunarColor;
71     Color nonCurrentMonthDayColor;
72     Color nonCurrentMonthLunarColor;
73     Color workDayMarkColor;
74     Color offDayMarkColor;
75     Color nonCurrentMonthWorkDayMarkColor;
76     Color nonCurrentMonthOffDayMarkColor;
77     Color focusedDayColor;
78     Color focusedLunarColor;
79     Color focusedAreaBackgroundColor;
80     Color blurAreaBackgroundColor;
81     Color titleTextColor;
82     Color touchColor;
83     Color markLunarColor;
84     Color clickEffectColor;
85     Color simpleWorkTextColor;
86     Color simpleOffTextColor;
87     Dimension weekFontSize;
88     Dimension dayFontSize;
89     Dimension lunarDayFontSize;
90     Dimension workDayMarkSize;
91     Dimension offDayMarkSize;
92     Dimension focusedAreaRadius;
93     Dimension topPadding;
94     Dimension workStateWidth;
95     Dimension workStateHorizontalMovingDistance;
96     Dimension workStateVerticalMovingDistance;
97     Dimension colSpace;
98     Dimension weekHeight;
99     Dimension dayHeight;
100     Dimension weekWidth;
101     Dimension dayWidth;
102     Dimension weekAndDayRowSpace;
103     Dimension dailyFiveRowSpace;
104     Dimension dailySixRowSpace;
105     Dimension gregorianCalendarHeight;
106     Dimension lunarHeight;
107     Dimension arrowHeight;
108     Dimension arrowWidth;
109     Dimension buttonWidth;
110     Dimension buttonHeight;
111     Dimension titleFontSize;
112     Dimension workStateOffset;
113     Dimension dayYAxisOffset;
114     Dimension lunarDayYAxisOffset;
115     Dimension underscoreXAxisOffset;
116     Dimension underscoreYAxisOffset;
117     Dimension scheduleMarkerXAxisOffset;
118     Dimension scheduleMarkerYAxisOffset;
119     Dimension underscoreWidth;
120     Dimension underscoreLength;
121     Dimension scheduleMarkerRadius;
122     Dimension touchCircleStrokeWidth;
123     Dimension boundaryRowOffset;
124     Dimension boundaryColOffset;
125 };
126 
127 class CalendarTheme : public virtual Theme {
128     DECLARE_ACE_TYPE(CalendarTheme, Theme);
129 
130 public:
131     ~CalendarTheme() override = default;
132     class Builder {
133     public:
134         Builder() = default;
135         ~Builder() = default;
136 
Build(const RefPtr<ThemeConstants> & themeConstants)137         RefPtr<CalendarTheme> Build(const RefPtr<ThemeConstants>& themeConstants) const
138         {
139             RefPtr<CalendarTheme> theme = AceType::Claim(new CalendarTheme());
140             if (!themeConstants) {
141                 return theme;
142             }
143             theme = AceType::Claim(new CalendarTheme());
144             ParseNewPattern(themeConstants, theme);
145             ParsePattern(themeConstants, theme);
146             return theme;
147         }
148     private:
ParseCardTheme(const RefPtr<ThemeConstants> & themeConstants,const RefPtr<CalendarTheme> & theme)149         void ParseCardTheme(const RefPtr<ThemeConstants>& themeConstants, const RefPtr<CalendarTheme>& theme) const
150         {
151             RefPtr<ThemeStyle> pattern = themeConstants->GetPatternByName(THEME_PATTERN_CALENDAR);
152             if (!pattern) {
153                 LOGW("find pattern of calendar fail");
154                 return;
155             }
156             // Card theme
157             theme->cardCalendarTheme_.focusedAreaBackgroundColor =
158                 pattern->GetAttr<Color>("card_area_bg_color_focused", Color::BLUE);
159             theme->cardCalendarTheme_.dayColor =
160                 pattern->GetAttr<Color>("card_day_color", DEFAULT_DAY_COLOR);
161             theme->cardCalendarTheme_.weekColor =
162                 pattern->GetAttr<Color>("card_week_color", Color::BLACK);
163             theme->cardCalendarTheme_.nonCurrentMonthDayColor =
164                 pattern->GetAttr<Color>("card_uncurrent_month_day_color", DEFAULT_NON_CURRENT_MONTH_DAY_COLOR);
165             theme->cardCalendarTheme_.weekendDayColor =
166                 pattern->GetAttr<Color>("card_weekend_color", DEFAULT_WEEKEND_DAY_COLOR);
167             theme->cardCalendarTheme_.weekendLunarColor =
168                 pattern->GetAttr<Color>("card_weekend_lunar_color", DEFAULT_WEEKEND_LUNAR_COLOR);
169             theme->cardCalendarTheme_.nonCurrentMonthLunarColor =
170                 pattern->GetAttr<Color>("card_uncurrent_month_lunar_color", DEFAULT_NON_CURRENT_MONTH_LUNAR_COLOR);
171             theme->cardCalendarTheme_.todayColor =
172                 pattern->GetAttr<Color>("card_today_color", Color::WHITE);
173             theme->cardCalendarTheme_.todayLunarColor =
174                 pattern->GetAttr<Color>("card_today_lunar_color", Color::WHITE);
175             theme->cardCalendarTheme_.lunarColor =
176                 pattern->GetAttr<Color>("card_lunar_color", DEFAULT_LUNAR_COLOR);
177             theme->cardCalendarTheme_.markLunarColor =
178                 pattern->GetAttr<Color>("card_mark_lunar_color", Color::BLUE);
179             theme->cardCalendarTheme_.titleTextColor =
180                 pattern->GetAttr<Color>("card_title_text_color", Color::BLACK);
181             theme->cardCalendarTheme_.clickEffectColor =
182                 pattern->GetAttr<Color>("card_switch_button_bg_color_clicked", Color::TRANSPARENT);
183         }
184 
ParseNormalTheme(const RefPtr<ThemeConstants> & themeConstants,const RefPtr<CalendarTheme> & theme)185         void ParseNormalTheme(const RefPtr<ThemeConstants>& themeConstants, const RefPtr<CalendarTheme>& theme) const
186         {
187             RefPtr<ThemeStyle> pattern = themeConstants->GetPatternByName(THEME_PATTERN_CALENDAR);
188             if (!pattern) {
189                 LOGW("find pattern of calendar fail");
190                 return;
191             }
192             // Normal theme
193             theme->calendarTheme_.dayColor =
194                 pattern->GetAttr<Color>(CALENDAR_DAY_COLOR, DEFAULT_CALENDAR_DAY_COLOR);
195             theme->calendarTheme_.weekColor =
196                 pattern->GetAttr<Color>(CALENDAR_WEEK_COLOR, DEFAULT_CALENDAR_WEEK_COLOR);
197             theme->calendarTheme_.lunarColor =
198                 pattern->GetAttr<Color>(CALENDAR_LUNAR_COLOR, DEFAULT_CALENDAR_LUNAR_COLOR);
199             theme->calendarTheme_.weekendDayColor =
200                 pattern->GetAttr<Color>(CALENDAR_WEEKEND_DAY_COLOR, DEFAULT_CALENDAR_WEEKEND_DAY_COLOR);
201             theme->calendarTheme_.weekendLunarColor =
202                 pattern->GetAttr<Color>(CALENDAR_WEEKEND_LUNAR_COLOR, DEFAULT_CALENDAR_WEEKEND_LUNAR_COLOR);
203             theme->calendarTheme_.focusedDayColor =
204                 pattern->GetAttr<Color>(CALENDAR_TODAY_DAY_FOCUS_COLOR, DEFAULT_CALENDAR_TODAY_DAY_FOCUS_COLOR);
205             theme->calendarTheme_.focusedLunarColor =
206                 pattern->GetAttr<Color>(CALENDAR_TODAY_LUNAR_FOCUS_COLOR, DEFAULT_CALENDAR_TODAY_LUNAR_FOCUS_COLOR);
207             theme->calendarTheme_.todayColor =
208                 pattern->GetAttr<Color>(CALENDAR_TODAY_DAY_UNFOCUS_COLOR, DEFAULT_CALENDAR_TODAY_DAY_UNFOCUS_COLOR);
209             theme->calendarTheme_.todayLunarColor =
210                 pattern->GetAttr<Color>(CALENDAR_TODAY_LUNAR_UNFOCUS_COLOR,
211                                         DEFAULT_CALENDAR_TODAY_LUNAR_UNFOCUS_COLOR);
212             theme->calendarTheme_.workDayMarkColor =
213                 pattern->GetAttr<Color>(CALENDAR_WORK_MARK_COLOR, DEFAULT_CALENDAR_WORK_MARK_COLOR);
214             theme->calendarTheme_.offDayMarkColor =
215                 pattern->GetAttr<Color>(CALENDAR_OFF_MARK_COLOR, DEFAULT_CALENDAR_OFF_MARK_COLOR);
216             theme->calendarTheme_.nonCurrentMonthWorkDayMarkColor = pattern->GetAttr<Color>(
217                 CALENDAR_NONCURRENT_MONTH_WORK_MARK_COLOR, DEFAULT_CALENDAR_NONCURRENT_MONTH_WORK_MARK_COLOR);
218             theme->calendarTheme_.nonCurrentMonthOffDayMarkColor = pattern->GetAttr<Color>(
219                 CALENDAR_NONCURRENT_MONTH_OFF_MARK_COLOR, DEFAULT_CALENDAR_NONCURRENT_MONTH_OFF_MARK_COLOR);
220             theme->calendarTheme_.nonCurrentMonthDayColor = pattern->GetAttr<Color>(
221                 CALENDAR_NONCURRENT_MONTH_DAY_COLOR, DEFAULT_CALENDAR_NONCURRENT_MONTH_DAY_COLOR);
222             theme->calendarTheme_.nonCurrentMonthLunarColor = pattern->GetAttr<Color>(
223                 CALENDAR_NONCURRENT_MONTH_LUNAR_COLOR, DEFAULT_CALENDAR_NONCURRENT_MONTH_LUNAR_COLOR);
224             theme->calendarTheme_.focusedAreaBackgroundColor = pattern->GetAttr<Color>(
225                 CALENDAR_FOCUS_AREA_BACKGROUND_COLOR, DEFAULT_CALENDAR_FOCUS_AREA_BACKGROUND_COLOR);
226             theme->calendarTheme_.blurAreaBackgroundColor = pattern->GetAttr<Color>(
227                 CALENDAR_BLUR_AREA_BACKGROUND_COLOR, DEFAULT_CALENDAR_BLUR_AREA_BACKGROUND_COLOR);
228             theme->calendarTheme_.monday = pattern->GetAttr<std::string>("calendar_picker_mon", "");
229             theme->calendarTheme_.tuesday = pattern->GetAttr<std::string>("calendar_picker_tue", "");
230             theme->calendarTheme_.wednesday = pattern->GetAttr<std::string>("calendar_picker_wed", "");
231             theme->calendarTheme_.thursday = pattern->GetAttr<std::string>("calendar_picker_thu", "");
232             theme->calendarTheme_.friday = pattern->GetAttr<std::string>("calendar_picker_fri", "");
233             theme->calendarTheme_.saturday = pattern->GetAttr<std::string>("calendar_picker_sat", "");
234             theme->calendarTheme_.sunday = pattern->GetAttr<std::string>("calendar_picker_sun", "");
235         }
236 
ParseCalenderPickerFirstPart(const RefPtr<ThemeConstants> & themeConstants,const RefPtr<CalendarTheme> & theme)237         void ParseCalenderPickerFirstPart(const RefPtr<ThemeConstants>& themeConstants,
238             const RefPtr<CalendarTheme>& theme) const
239         {
240             RefPtr<ThemeStyle> pattern = themeConstants->GetPatternByName(THEME_PATTERN_CALENDAR);
241             if (!pattern) {
242                 LOGW("find pattern of calendar fail");
243                 return;
244             }
245             theme->entryBorderColor_ = pattern->GetAttr<Color>("calendar_picker_entry_border_color", Color());
246             theme->entryArrowColor_ = pattern->GetAttr<Color>("calendar_picker_entry_arrow_color", Color());
247             theme->selectBackgroundColor_ = pattern->GetAttr<Color>(
248                 "calendar_picker_select_background_color", Color());
249             theme->dialogBackgroundColor_ = pattern->GetAttr<Color>(
250                 "calendar_picker_dialog_background_color", Color());
251             theme->calendarTitleFontColor_ = pattern->GetAttr<Color>("calendar_picker_title_font_color", Color());
252             Color currentMonthColor = pattern->GetAttr<Color>("calendar_picker_title_font_color", Color());
253             theme->textCurrentMonthColor_ = currentMonthColor.BlendOpacity(
254                 pattern->GetAttr<double>("calendar_picker_attribute_alpha_content_primary", 0.0));
255             theme->textNonCurrentMonthColor_ = currentMonthColor.BlendOpacity(
256                 pattern->GetAttr<double>("calendar_picker_attribute_alpha_content_tertiary", 0.0));
257             theme->textSelectedDayColor_ = pattern->GetAttr<Color>(
258                 "calendar_picker_text_selected_day_color", Color());
259             theme->textCurrentDayColor_ = pattern->GetAttr<Color>("calendar_picker_text_current_day_color", Color());
260             theme->backgroundKeyFocusedColor_ = pattern->GetAttr<Color>(
261                 "calendar_picker_background_key_focused_color", Color());
262             Color backgroundSelectedTodayColor = pattern->GetAttr<Color>(
263                 "calendar_picker_background_selected_focused_color", Color());
264             theme->dialogButtonBackgroundColor_ = pattern->GetAttr<Color>(
265                 "calendar_picker_dialog_button_bg_color", Color());
266             theme->backgroundSelectedTodayColor_ = backgroundSelectedTodayColor;
267             theme->backgroundSelectedNotTodayColor_ = backgroundSelectedTodayColor.BlendOpacity(
268                 pattern->GetAttr<double>("calendar_picker_attribute_alpha_highlight_bg", 0.0));
269             theme->backgroundHoverColor_ = pattern->GetAttr<Color>("calendar_picker_background_hover_color", Color());
270             theme->backgroundPressColor_ = pattern->GetAttr<Color>("calendar_picker_background_press_color", Color());
271             theme->entryFontColor_ = pattern->GetAttr<Color>("calendar_picker_entry_font_color", Color());
272             theme->dialogDividerColor_ = pattern->GetAttr<Color>("calendar_picker_dialog_divider_color", Color());
273             theme->entryHeight_ = pattern->GetAttr<Dimension>("calendar_picker_entry_height", 0.0_vp);
274             theme->entryBorderWidth_ = pattern->GetAttr<Dimension>("calendar_picker_entry_border_width", 0.0_vp);
275             theme->entryBorderRadius_ = pattern->GetAttr<Dimension>("calendar_picker_entry_border_radius", 0.0_vp);
276             theme->entryButtonWidth_ = pattern->GetAttr<Dimension>("calendar_picker_entry_button_width", 0.0_vp);
277             theme->entryArrowHeight_ = pattern->GetAttr<Dimension>("calendar_picker_entry_arrow_height", 0.0_vp);
278             theme->entryArrowwidth_ = pattern->GetAttr<Dimension>("calendar_picker_entry_arrow_width", 0.0_vp);
279         }
ParseCalenderPickerSecondPart(const RefPtr<ThemeConstants> & themeConstants,const RefPtr<CalendarTheme> & theme)280         void ParseCalenderPickerSecondPart(const RefPtr<ThemeConstants>& themeConstants,
281             const RefPtr<CalendarTheme>& theme) const
282         {
283             RefPtr<ThemeStyle> pattern = themeConstants->GetPatternByName(THEME_PATTERN_CALENDAR);
284             if (!pattern) {
285                 LOGW("find pattern of calendar fail");
286                 return;
287             }
288             theme->entryDateLeftRightMargin_ = pattern->GetAttr<Dimension>(
289                 "calendar_picker_entry_date_left_right_margin", 0.0_vp);
290             theme->entryDateTopBottomMargin_ = pattern->GetAttr<Dimension>(
291                 "calendar_picker_entry_date_top_bottom_margin", 0.0_vp);
292             theme->dialogMargin_ = pattern->GetAttr<Dimension>("calendar_picker_dialog_margin", 0.0_vp);
293             theme->calendarPickerDayWidthOrHeight_ = pattern->GetAttr<Dimension>(
294                 "calendar_picker_day_width_height", 0.0_vp);
295             theme->calendarPickerDayLargeWidthOrHeight_ =
296                 pattern->GetAttr<Dimension>("calendar_picker_day_large_width_height", 40.0_vp);
297             theme->calendarDayFontSize_ = pattern->GetAttr<Dimension>("calendar_picker_day_font_size", 0.0_vp);
298             theme->calendarSmallWeekFontSize_ =
299                 pattern->GetAttr<Dimension>("calendar_picker_small_day_font_size", 14.0_vp);
300             theme->distanceBetweenContainterAndDate_ = pattern->GetAttr<Dimension>(
301                 "calendar_picker_distance_between_container_and_date", 0.0_vp);
302             theme->distanceBetweenTitleAndDate_ = pattern->GetAttr<Dimension>(
303                 "calendar_picker_distance_between_title_and_date", 0.0_vp);
304             theme->dalendarContainerHeight_ = pattern->GetAttr<Dimension>("calendar_picker_container_height", 0.0_vp);
305             theme->calendarLargeContainerHeight_ =
306                 pattern->GetAttr<Dimension>("calendar_picker_large_container_height", 316.0_vp);
307             theme->calendarLargerContainerHeight_ =
308                 pattern->GetAttr<Dimension>("calendar_picker_larger_container_height", 337.0_vp);
309             theme->calendarTitleFontSize_ = pattern->GetAttr<Dimension>("calendar_picker_title_font_size", 0.0_vp);
310             theme->calendarTitleRowHeight_ = pattern->GetAttr<Dimension>("calendar_picker_title_row_height", 0.0_vp);
311             theme->calendarTitleLargeRowHeight_ =
312                 pattern->GetAttr<Dimension>("calendar_picker_title_large_row_height", 94.0_vp);
313             theme->calendarTitleLargerRowHeight_ =
314                 pattern->GetAttr<Dimension>("calendar_picker_title_larger_row_height", 106.0_vp);
315         }
316 
ParseCalenderPickerThirdPart(const RefPtr<ThemeConstants> & themeConstants,const RefPtr<CalendarTheme> & theme)317         void ParseCalenderPickerThirdPart(const RefPtr<ThemeConstants>& themeConstants,
318             const RefPtr<CalendarTheme>& theme) const
319         {
320             RefPtr<ThemeStyle> pattern = themeConstants->GetPatternByName(THEME_PATTERN_CALENDAR);
321             if (!pattern) {
322                 LOGW("find pattern of calendar fail");
323                 return;
324             }
325             theme->calendarTitleRowTopPadding_ = pattern->GetAttr<Dimension>(
326                 "calendar_picker_title_row_top_padding", 0.0_vp);
327             theme->calendarTitleRowLeftRightPadding_ = pattern->GetAttr<Dimension>(
328                 "calendar_picker_title_row_left_right_padding", 0.0_vp);
329             theme->calendarTitleTextPadding_ = pattern->GetAttr<Dimension>(
330                 "calendar_picker_title_text_padding", 0.0_vp);
331             theme->calendarTitleImagePadding_ = pattern->GetAttr<Dimension>(
332                 "calendar_picker_title_image_padding", 0.0_vp);
333             theme->calendarImageWidthHeight_ = pattern->GetAttr<Dimension>(
334                 "calendar_picker_image_width_height", 0.0_vp);
335             theme->calendarActionRowTopPadding_ = pattern->GetAttr<Dimension>(
336                 "calendar_picker_action_row_top_padding", 0.0_vp);
337             theme->calendarActionRowBottomLeftRightPadding_ = pattern->GetAttr<Dimension>(
338                 "calendar_picker_action_row_bottom_left_right_padding", 0.0_vp);
339             theme->calendarActionRowHeight_ = pattern->GetAttr<Dimension>("calendar_picker_action_row_height", 0.0_vp);
340             theme->calendarActionLargeRowHeight_ =
341                 pattern->GetAttr<Dimension>("calendar_picker_action_large_row_height", 48.0_vp);
342             theme->calendarDayRadius_ = pattern->GetAttr<Dimension>("calendar_picker_day_radius", 0.0_vp);
343             theme->calendarDayKeyFocusedWidth_ = pattern->GetAttr<Dimension>("calendar_day_key_focused_width", 0.0_vp);
344             theme->calendarLargeDayKeyFocusedWidth_ =
345                 pattern->GetAttr<Dimension>("calendar_large_day_key_focused_width", 44.0_vp);
346             theme->calendarDayKeyFocusedPenWidth_ = pattern->GetAttr<Dimension>(
347                 "calendar_day_key_focused_pen_width", 0.0_vp);
348             theme->entryFontSize_ = pattern->GetAttr<Dimension>("calendar_picker_entry_font_size", 0.0_fp);
349             theme->dialogBorderRadius_ = pattern->GetAttr<Dimension>("calendar_picker_dialog_border_radius", 0.0_vp);
350         }
351 
ParsePattern(const RefPtr<ThemeConstants> & themeConstants,const RefPtr<CalendarTheme> & theme)352         void ParsePattern(const RefPtr<ThemeConstants>& themeConstants, const RefPtr<CalendarTheme>& theme) const
353         {
354             RefPtr<ThemeStyle> pattern = themeConstants->GetPatternByName(THEME_PATTERN_CALENDAR);
355             if (!pattern) {
356                 LOGW("find pattern of calendar fail");
357                 return;
358             }
359             // Card theme
360             ParseCardTheme(themeConstants, theme);
361             // Normal theme
362             ParseNormalTheme(themeConstants, theme);
363             // calendar picker
364             ParseCalenderPickerFirstPart(themeConstants, theme);
365             ParseCalenderPickerSecondPart(themeConstants, theme);
366             ParseCalenderPickerThirdPart(themeConstants, theme);
367         }
368 
ParseCalendarThemePattern(const RefPtr<ThemeConstants> & themeConstants,const RefPtr<CalendarTheme> & theme)369         void ParseCalendarThemePattern(const RefPtr<ThemeConstants>& themeConstants,
370             const RefPtr<CalendarTheme>& theme) const
371         {
372             RefPtr<ThemeStyle> pattern = themeConstants->GetPatternByName(THEME_PATTERN_CALENDAR);
373             CHECK_NULL_VOID(pattern);
374             theme->calendarTheme_.weekFontSize = pattern->GetAttr<Dimension>("calendar_week_font_size", 14.0_fp);
375             theme->calendarTheme_.dayFontSize = pattern->GetAttr<Dimension>("calendar_day_font_size", 18.0_fp);
376             theme->calendarTheme_.lunarDayFontSize = pattern->GetAttr<Dimension>("calendar_lunar_font_size", 12.0_fp);
377             theme->calendarTheme_.workDayMarkSize =
378                 pattern->GetAttr<Dimension>("calendar_work_day_mark_font_size", 10.0_fp);
379             theme->calendarTheme_.offDayMarkSize =
380                 pattern->GetAttr<Dimension>("calendar_off_day_mark_font_size", 10.0_fp);
381             theme->calendarTheme_.focusedAreaRadius =
382                 pattern->GetAttr<Dimension>("calendar_focused_area_radius", 24.0_vp);
383             theme->calendarTheme_.topPadding = pattern->GetAttr<Dimension>("top_padding", 16.0_vp);
384             theme->calendarTheme_.workStateWidth = pattern->GetAttr<Dimension>("work_state_width", 16.0_vp);
385             theme->calendarTheme_.workStateHorizontalMovingDistance =
386                 pattern->GetAttr<Dimension>("work_state_horizontal_moving_distance", 2.0_vp);
387             theme->calendarTheme_.workStateVerticalMovingDistance =
388                 pattern->GetAttr<Dimension>("work_state_vertical_moving_distance", 16.0_vp);
389             theme->calendarTheme_.colSpace = pattern->GetAttr<Dimension>("column_space", 39.0_vp);
390             theme->calendarTheme_.weekHeight = pattern->GetAttr<Dimension>("week_height", 19.0_vp);
391             theme->calendarTheme_.dayHeight = pattern->GetAttr<Dimension>("day_height", 41.0_vp);
392             theme->calendarTheme_.weekWidth = pattern->GetAttr<Dimension>("week_width", 48.0_vp);
393             theme->calendarTheme_.dayWidth = pattern->GetAttr<Dimension>("day_width", 48.0_vp);
394             theme->calendarTheme_.weekAndDayRowSpace = pattern->GetAttr<Dimension>("week_and_day_space", 12.0_vp);
395             theme->calendarTheme_.dailyFiveRowSpace = pattern->GetAttr<Dimension>("five_row_space", 20.0_vp);
396             theme->calendarTheme_.dailySixRowSpace = pattern->GetAttr<Dimension>("six_row_space", 10.0_vp);
397             theme->calendarTheme_.gregorianCalendarHeight = pattern->GetAttr<Dimension>("gregorian_height", 25.0_vp);
398             theme->calendarTheme_.dayFontWeight = pattern->GetAttr<std::string>("day_font_weight", "500");
399             theme->calendarTheme_.lunarDayFontWeight = pattern->GetAttr<std::string>("lunar_day_font_weight", "500");
400             theme->calendarTheme_.workStateFontWeight = pattern->GetAttr<std::string>("work_state_font_weight", "400");
401             theme->calendarTheme_.workStateOffset =
402                 pattern->GetAttr<Dimension>("work_state_center_adjustment", 0.0_vp);
403             theme->calendarTheme_.dayYAxisOffset = pattern->GetAttr<Dimension>("day_yaxis_offset", 4.0_vp);
404             theme->calendarTheme_.lunarDayYAxisOffset = pattern->GetAttr<Dimension>("lunar_day_yaxis_offset", 23.0_vp);
405             theme->calendarTheme_.underscoreXAxisOffset =
406                 pattern->GetAttr<Dimension>("underscore_xaxis_offset", 12.0_vp);
407             theme->calendarTheme_.underscoreYAxisOffset =
408                 pattern->GetAttr<Dimension>("underscore_yaxis_offset", 36.0_vp);
409             theme->calendarTheme_.scheduleMarkerXAxisOffset =
410                 pattern->GetAttr<Dimension>("schedule_marker_xaxis_offset", 22.0_vp);
411             theme->calendarTheme_.scheduleMarkerYAxisOffset =
412                 pattern->GetAttr<Dimension>("schedule_marker_yaxis_offset", 40.0_vp);
413             theme->calendarTheme_.touchCircleStrokeWidth =
414                 pattern->GetAttr<Dimension>("touch_circle_stroke_width", 1.0_vp);
415             theme->calendarTheme_.lunarHeight = pattern->GetAttr<Dimension>("lunar_height", 14.0_vp);
416             theme->calendarTheme_.underscoreWidth = pattern->GetAttr<Dimension>("underscore_width", 1.0_vp);
417             theme->calendarTheme_.underscoreLength = pattern->GetAttr<Dimension>("underscore_length", 20.0_vp);
418             theme->calendarTheme_.scheduleMarkerRadius =
419                 pattern->GetAttr<Dimension>("schedule_marker_radius", 2.0_vp);
420         }
421 
ParseCardCalendarThemePattern(const RefPtr<ThemeConstants> & themeConstants,const RefPtr<CalendarTheme> & theme)422         void ParseCardCalendarThemePattern(const RefPtr<ThemeConstants>& themeConstants,
423             const RefPtr<CalendarTheme>& theme) const
424         {
425             RefPtr<ThemeStyle> pattern = themeConstants->GetPatternByName(THEME_PATTERN_CALENDAR);
426             CHECK_NULL_VOID(pattern);
427             theme->cardCalendarTheme_.arrowHeight = pattern->GetAttr<Dimension>("arrow_height", 16.0_vp);
428             theme->cardCalendarTheme_.arrowWidth = pattern->GetAttr<Dimension>("arrow_width", 16.0_vp);
429             theme->cardCalendarTheme_.buttonHeight =
430                 pattern->GetAttr<Dimension>("card_calendar_button_height", 32.0_vp);
431             theme->cardCalendarTheme_.buttonWidth =
432                 pattern->GetAttr<Dimension>("card_calendar_button_width", 32.0_vp);
433             theme->cardCalendarTheme_.titleFontSize =
434                 pattern->GetAttr<Dimension>("card_calendar_title_font_size", 16.0_vp);
435             theme->cardCalendarTheme_.focusedDayColor =
436                 pattern->GetAttr<Color>("today_day_focus_color", Color(0xFFFFFFFF));
437             theme->cardCalendarTheme_.touchColor = pattern->GetAttr<Color>("calendar_touch_color", Color(0x320A59F7));
438             theme->cardCalendarTheme_.topPadding = pattern->GetAttr<Dimension>("card_calendar_top_padding", 0.0_vp);
439             theme->cardCalendarTheme_.weekHeight = pattern->GetAttr<Dimension>("card_calendar_week_height", 14.0_vp);
440             theme->cardCalendarTheme_.dayHeight = pattern->GetAttr<Dimension>("card_calendar_day_height", 44.0_vp);
441             theme->cardCalendarTheme_.weekWidth = pattern->GetAttr<Dimension>("card_calendar_week_width", 44.0_vp);
442             theme->cardCalendarTheme_.dayWidth = pattern->GetAttr<Dimension>("card_calendar_day_width", 44.0_vp);
443             theme->cardCalendarTheme_.focusedAreaRadius =
444                 pattern->GetAttr<Dimension>("card_calendar_focus_area_radius", 22.0_vp);
445             theme->cardCalendarTheme_.weekFontSize =
446                 pattern->GetAttr<Dimension>("card_calendar_week_font_size", 10.0_fp);
447             theme->cardCalendarTheme_.dayFontSize =
448                 pattern->GetAttr<Dimension>("card_calendar_day_font_size", 16.0_vp);
449             theme->cardCalendarTheme_.gregorianCalendarHeight =
450                 pattern->GetAttr<Dimension>("card_calendar_gregorian_height", 24.0_vp);
451             theme->cardCalendarTheme_.lunarDayFontSize =
452                 pattern->GetAttr<Dimension>("card_calendar_lunar_font_size", 10.0_vp);
453             theme->cardCalendarTheme_.workDayMarkColor = pattern->GetAttr<Color>("work_mark_color", Color(0xffe83f26));
454             theme->cardCalendarTheme_.weekAndDayRowSpace =
455                 pattern->GetAttr<Dimension>("card_calendar_week_day_row_space", 4.0_vp);
456             theme->cardCalendarTheme_.dailyFiveRowSpace =
457                 pattern->GetAttr<Dimension>("card_calendar_daily_five_row_space", 10.0_vp);
458             theme->cardCalendarTheme_.dayYAxisOffset = pattern->GetAttr<Dimension>("day_yaxis_offset", 4.0_vp);
459             theme->cardCalendarTheme_.lunarDayYAxisOffset =
460                 pattern->GetAttr<Dimension>("lunar_day_yaxis_offset", 23.0_vp);
461             theme->cardCalendarTheme_.underscoreXAxisOffset =
462                 pattern->GetAttr<Dimension>("underscore_xaxis_offset", 12.0_vp);
463             theme->cardCalendarTheme_.underscoreYAxisOffset =
464                 pattern->GetAttr<Dimension>("underscore_yaxis_offset", 36.0_vp);
465             theme->cardCalendarTheme_.scheduleMarkerXAxisOffset =
466                 pattern->GetAttr<Dimension>("schedule_marker_xaxis_offset", 22.0_vp);
467             theme->cardCalendarTheme_.scheduleMarkerYAxisOffset =
468                 pattern->GetAttr<Dimension>("schedule_marker_yaxis_offset", 40.0_vp);
469         }
470 
ParseNewPattern(const RefPtr<ThemeConstants> & themeConstants,const RefPtr<CalendarTheme> & theme)471         void ParseNewPattern(const RefPtr<ThemeConstants>& themeConstants, const RefPtr<CalendarTheme>& theme) const
472         {
473             RefPtr<ThemeStyle> pattern = themeConstants->GetPatternByName(THEME_PATTERN_CALENDAR);
474             if (!pattern) {
475                 LOGW("find pattern of calendar fail");
476                 return;
477             }
478             ParseCalendarThemePattern(themeConstants, theme);
479             ParseCardCalendarThemePattern(themeConstants, theme);
480             theme->cardCalendarTheme_.lunarHeight = pattern->GetAttr<Dimension>("lunar_height", 14.0_vp);
481             theme->cardCalendarTheme_.underscoreWidth = pattern->GetAttr<Dimension>("underscore_width", 1.0_vp);
482             theme->cardCalendarTheme_.underscoreLength = pattern->GetAttr<Dimension>("underscore_length", 20.0_vp);
483             theme->cardCalendarTheme_.scheduleMarkerRadius =
484                 pattern->GetAttr<Dimension>("schedule_marker_radius", 2.0_vp);
485             theme->cardCalendarTheme_.boundaryColOffset =
486                 pattern->GetAttr<Dimension>("boundary_col_offset", 50.0_vp);
487             std::string isButtonTransparent =
488                 pattern->GetAttr<std::string>("calendar_picker_dialog_button_transparent", "true");
489             theme->isButtonTransparent_ = (isButtonTransparent == "true");
490             std::string isDividerTransparent =
491                 pattern->GetAttr<std::string>("calendar_picker_dialog_divider_transparent", "false");
492             theme->isDividerTransparent_ = (isDividerTransparent == "true");
493             theme->calendarPickerLargeScale_ = pattern->GetAttr<double>("calendar_picker_large_scale", 1.75);
494             theme->calendarPickerLargerScale_ = pattern->GetAttr<double>("calendar_picker_larger_scale", 2.0);
495         }
496     };
497 
GetCalendarTheme()498     CalendarThemeStructure& GetCalendarTheme()
499     {
500         return calendarTheme_;
501     }
502 
GetCardCalendarTheme()503     CalendarThemeStructure& GetCardCalendarTheme()
504     {
505         return cardCalendarTheme_;
506     }
507 
GetEntryHeight()508     const Dimension& GetEntryHeight() const
509     {
510         return entryHeight_;
511     }
512 
GetEntryBorderWidth()513     const Dimension& GetEntryBorderWidth() const
514     {
515         return entryBorderWidth_;
516     }
517 
GetEntryBorderColor()518     const Color& GetEntryBorderColor() const
519     {
520         return entryBorderColor_;
521     }
522 
GetEntryBorderRadius()523     const Dimension& GetEntryBorderRadius() const
524     {
525         return entryBorderRadius_;
526     }
527 
GetEntryButtonWidth()528     const Dimension& GetEntryButtonWidth() const
529     {
530         return entryButtonWidth_;
531     }
532 
GetEntryDateTopBottomMargin()533     const Dimension& GetEntryDateTopBottomMargin() const
534     {
535         return entryDateTopBottomMargin_;
536     }
537 
GetEntryDateLeftRightMargin()538     const Dimension& GetEntryDateLeftRightMargin() const
539     {
540         return entryDateLeftRightMargin_;
541     }
542 
GetEntryArrowWidth()543     const Dimension& GetEntryArrowWidth() const
544     {
545         return entryArrowwidth_;
546     }
547 
GetEntryArrowHeight()548     const Dimension& GetEntryArrowHeight() const
549     {
550         return entryArrowHeight_;
551     }
552 
GetEntryArrowColor()553     const Color& GetEntryArrowColor() const
554     {
555         return entryArrowColor_;
556     }
557 
GetDialogMargin()558     const Dimension& GetDialogMargin() const
559     {
560         return dialogMargin_;
561     }
562 
GetSelectBackgroundColor()563     const Color& GetSelectBackgroundColor() const
564     {
565         return selectBackgroundColor_;
566     }
567 
GetCalendarPickerDayWidthOrHeight()568     const Dimension& GetCalendarPickerDayWidthOrHeight() const
569     {
570         return calendarPickerDayWidthOrHeight_;
571     }
572 
GetCalendarPickerDayLargeWidthOrHeight()573     const Dimension& GetCalendarPickerDayLargeWidthOrHeight() const
574     {
575         return calendarPickerDayLargeWidthOrHeight_;
576     }
577 
GetCalendarDayFontSize()578     const Dimension& GetCalendarDayFontSize() const
579     {
580         return calendarDayFontSize_;
581     }
582 
GetCalendarSmallDayFontSize()583     const Dimension& GetCalendarSmallDayFontSize() const
584     {
585         return calendarSmallWeekFontSize_;
586     }
587 
GetDistanceBetweenContainterAndDate()588     const Dimension& GetDistanceBetweenContainterAndDate() const
589     {
590         return distanceBetweenContainterAndDate_;
591     }
592 
GetDistanceBetweenTitleAndDate()593     const Dimension& GetDistanceBetweenTitleAndDate() const
594     {
595         return distanceBetweenTitleAndDate_;
596     }
597 
GetCalendarContainerHeight()598     const Dimension& GetCalendarContainerHeight() const
599     {
600         return dalendarContainerHeight_;
601     }
602 
GetCalendarLargeContainerHeight()603     const Dimension& GetCalendarLargeContainerHeight() const
604     {
605         return calendarLargeContainerHeight_;
606     }
607 
GetCalendarLargerContainerHeight()608     const Dimension& GetCalendarLargerContainerHeight() const
609     {
610         return calendarLargerContainerHeight_;
611     }
612 
GetCalendarTitleFontSize()613     const Dimension& GetCalendarTitleFontSize() const
614     {
615         return calendarTitleFontSize_;
616     }
617 
GetCalendarTitleRowHeight()618     const Dimension& GetCalendarTitleRowHeight() const
619     {
620         return calendarTitleRowHeight_;
621     }
622 
GetCalendarTitleLargeRowHeight()623     const Dimension& GetCalendarTitleLargeRowHeight() const
624     {
625         return calendarTitleLargeRowHeight_;
626     }
627 
GetCalendarTitleLargerRowHeight()628     const Dimension& GetCalendarTitleLargerRowHeight() const
629     {
630         return calendarTitleLargerRowHeight_;
631     }
632 
GetCalendarTitleRowTopPadding()633     const Dimension& GetCalendarTitleRowTopPadding() const
634     {
635         return calendarTitleRowTopPadding_;
636     }
637 
GetCalendarTitleRowLeftRightPadding()638     const Dimension& GetCalendarTitleRowLeftRightPadding() const
639     {
640         return calendarTitleRowLeftRightPadding_;
641     }
642 
GetCalendarTitleTextPadding()643     const Dimension& GetCalendarTitleTextPadding() const
644     {
645         return calendarTitleTextPadding_;
646     }
647 
GetCalendarTitleImagePadding()648     const Dimension& GetCalendarTitleImagePadding() const
649     {
650         return calendarTitleImagePadding_;
651     }
652 
GetCalendarImageWidthHeight()653     const Dimension& GetCalendarImageWidthHeight() const
654     {
655         return calendarImageWidthHeight_;
656     }
657 
GetCalendarActionRowTopPadding()658     const Dimension& GetCalendarActionRowTopPadding() const
659     {
660         return calendarActionRowTopPadding_;
661     }
662 
GetCalendarActionRowBottomLeftRightPadding()663     const Dimension& GetCalendarActionRowBottomLeftRightPadding() const
664     {
665         return calendarActionRowBottomLeftRightPadding_;
666     }
667 
GetCalendarActionRowHeight()668     const Dimension& GetCalendarActionRowHeight() const
669     {
670         return calendarActionRowHeight_;
671     }
672 
GetCalendarActionLargeRowHeight()673     const Dimension& GetCalendarActionLargeRowHeight() const
674     {
675         return calendarActionLargeRowHeight_;
676     }
677 
GetCalendarDayRadius()678     const Dimension& GetCalendarDayRadius() const
679     {
680         return calendarDayRadius_;
681     }
682 
GetCalendarDayKeyFocusedWidth()683     const Dimension& GetCalendarDayKeyFocusedWidth() const
684     {
685         return calendarDayKeyFocusedWidth_;
686     }
687 
GetCalendarLargeDayKeyFocusedWidth()688     const Dimension& GetCalendarLargeDayKeyFocusedWidth() const
689     {
690         return calendarLargeDayKeyFocusedWidth_;
691     }
692 
GetCalendarDayKeyFocusedPenWidth()693     const Dimension& GetCalendarDayKeyFocusedPenWidth() const
694     {
695         return calendarDayKeyFocusedPenWidth_;
696     }
697 
GetEntryFontSize()698     const Dimension& GetEntryFontSize() const
699     {
700         return entryFontSize_;
701     }
702 
GetDialogBorderRadius()703     const Dimension& GetDialogBorderRadius() const
704     {
705         return dialogBorderRadius_;
706     }
707 
GetDialogBackgroundColor()708     const Color& GetDialogBackgroundColor() const
709     {
710         return dialogBackgroundColor_;
711     }
712 
GetCalendarTitleFontColor()713     const Color& GetCalendarTitleFontColor() const
714     {
715         return calendarTitleFontColor_;
716     }
717 
GetTextCurrentMonthColor()718     const Color& GetTextCurrentMonthColor() const
719     {
720         return textCurrentMonthColor_;
721     }
722 
GetTextNonCurrentMonthColor()723     const Color& GetTextNonCurrentMonthColor() const
724     {
725         return textNonCurrentMonthColor_;
726     }
727 
GetTextSelectedDayColor()728     const Color& GetTextSelectedDayColor() const
729     {
730         return textSelectedDayColor_;
731     }
732 
GetTextCurrentDayColor()733     const Color& GetTextCurrentDayColor() const
734     {
735         return textCurrentDayColor_;
736     }
737 
GetBackgroundKeyFocusedColor()738     const Color& GetBackgroundKeyFocusedColor() const
739     {
740         return backgroundKeyFocusedColor_;
741     }
742 
GetBackgroundSelectedTodayColor()743     const Color& GetBackgroundSelectedTodayColor() const
744     {
745         return backgroundSelectedTodayColor_;
746     }
747 
GetBackgroundSelectedNotTodayColor()748     const Color& GetBackgroundSelectedNotTodayColor() const
749     {
750         return backgroundSelectedNotTodayColor_;
751     }
752 
GetBackgroundHoverColor()753     const Color& GetBackgroundHoverColor() const
754     {
755         return backgroundHoverColor_;
756     }
757 
GetBackgroundPressColor()758     const Color& GetBackgroundPressColor() const
759     {
760         return backgroundPressColor_;
761     }
762 
GetEntryFontColor()763     const Color& GetEntryFontColor() const
764     {
765         return entryFontColor_;
766     }
767 
GetDialogDividerColor()768     const Color& GetDialogDividerColor() const
769     {
770         return dialogDividerColor_;
771     }
772 
GetDialogButtonBackgroundColor()773     const Color& GetDialogButtonBackgroundColor() const
774     {
775         return dialogButtonBackgroundColor_;
776     }
777 
GetIsButtonTransparent()778     bool GetIsButtonTransparent() const
779     {
780         return isButtonTransparent_;
781     }
782 
GetIsDividerTransparent()783     bool GetIsDividerTransparent() const
784     {
785         return isDividerTransparent_;
786     }
787 
GetCalendarPickerLargeScale()788     double GetCalendarPickerLargeScale() const
789     {
790         return calendarPickerLargeScale_;
791     }
792 
GetCalendarPickerLargerScale()793     double GetCalendarPickerLargerScale() const
794     {
795         return calendarPickerLargerScale_;
796     }
797 protected:
798     CalendarTheme() = default;
799 
800 private:
801     CalendarThemeStructure calendarTheme_;
802     CalendarThemeStructure cardCalendarTheme_;
803     Color entryBorderColor_;
804     Color entryArrowColor_;
805     Color selectBackgroundColor_;
806     Color dialogBackgroundColor_;
807     Color calendarTitleFontColor_;
808     Color textCurrentMonthColor_;
809     Color textNonCurrentMonthColor_;
810     Color textSelectedDayColor_;
811     Color textCurrentDayColor_;
812     Color backgroundKeyFocusedColor_;
813     Color backgroundSelectedTodayColor_;
814     Color backgroundSelectedNotTodayColor_;
815     Color backgroundHoverColor_;
816     Color backgroundPressColor_;
817     Color entryFontColor_;
818     Color dialogDividerColor_;
819     Color dialogButtonBackgroundColor_;
820     Dimension entryHeight_;
821     Dimension entryBorderWidth_;
822     Dimension entryBorderRadius_;
823     Dimension entryButtonWidth_;
824     Dimension entryArrowHeight_;
825     Dimension entryArrowwidth_;
826     Dimension entryDateLeftRightMargin_;
827     Dimension entryDateTopBottomMargin_;
828     Dimension dialogMargin_;
829     Dimension calendarPickerDayWidthOrHeight_;
830     Dimension calendarPickerDayLargeWidthOrHeight_;
831     Dimension calendarDayFontSize_;
832     Dimension calendarSmallWeekFontSize_;
833     Dimension distanceBetweenContainterAndDate_;
834     Dimension distanceBetweenTitleAndDate_;
835     Dimension dalendarContainerHeight_;
836     Dimension calendarLargeContainerHeight_;
837     Dimension calendarLargerContainerHeight_;
838     Dimension calendarTitleFontSize_;
839     Dimension calendarTitleRowHeight_;
840     Dimension calendarTitleLargeRowHeight_;
841     Dimension calendarTitleLargerRowHeight_;
842     Dimension calendarTitleRowTopPadding_;
843     Dimension calendarTitleRowLeftRightPadding_;
844     Dimension calendarTitleTextPadding_;
845     Dimension calendarTitleImagePadding_;
846     Dimension calendarImageWidthHeight_;
847     Dimension calendarActionRowTopPadding_;
848     Dimension calendarActionRowBottomLeftRightPadding_;
849     Dimension calendarActionRowHeight_;
850     Dimension calendarActionLargeRowHeight_;
851     Dimension calendarDayRadius_;
852     Dimension calendarDayKeyFocusedWidth_;
853     Dimension calendarLargeDayKeyFocusedWidth_;
854     Dimension calendarDayKeyFocusedPenWidth_;
855     Dimension entryFontSize_;
856     Dimension dialogBorderRadius_;
857     bool isButtonTransparent_ = true;
858     bool isDividerTransparent_ = false;
859     double calendarPickerLargeScale_ = 0.0;
860     double calendarPickerLargerScale_ = 0.0;
861 };
862 
863 } // namespace OHOS::Ace
864 
865 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_CALENDAR_CALENDAR_THEME_H
866