1 /* 2 * Copyright (c) 2021-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 */ 15 16 #ifndef FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_POPUP_POPUP_THEME_H 17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_POPUP_POPUP_THEME_H 18 19 #include "base/geometry/dimension.h" 20 #include "core/common/container.h" 21 #include "core/components/common/properties/color.h" 22 #include "core/components/common/properties/edge.h" 23 #include "core/components/common/properties/text_style.h" 24 #include "core/components/theme/theme.h" 25 #include "core/components/theme/theme_constants.h" 26 #include "core/components/theme/theme_constants_defines.h" 27 #include "core/components/common/properties/decoration.h" 28 29 namespace OHOS::Ace { 30 namespace { 31 constexpr uint32_t SHOW_TIME = 250; // unit is ms. 32 constexpr uint32_t HIDE_TIME = 250; // unit is ms. 33 constexpr Dimension TARGET_SPACE = 8.0_vp; 34 constexpr Dimension BORDER_RADIUS_POPUP = 20.0_vp; 35 constexpr double DEFAULT_OPACITY = 0.95; 36 } // namespace 37 38 /** 39 * PopupTheme defines color and styles of PopupComponent. PopupTheme should be built 40 * using PopupTheme::Builder. 41 */ 42 class PopupTheme : public virtual Theme { 43 DECLARE_ACE_TYPE(PopupTheme, Theme); 44 45 public: 46 class Builder { 47 public: 48 Builder() = default; 49 ~Builder() = default; 50 Build(const RefPtr<ThemeConstants> & themeConstants)51 RefPtr<PopupTheme> Build(const RefPtr<ThemeConstants>& themeConstants) const 52 { 53 RefPtr<PopupTheme> theme = AceType::MakeRefPtr<PopupTheme>(); 54 if (!themeConstants) { 55 return theme; 56 } 57 ParsePattern(themeConstants, theme); 58 theme->showTime_ = SHOW_TIME; 59 theme->hideTime_ = HIDE_TIME; 60 return theme; 61 } 62 63 private: ParsePattern(const RefPtr<ThemeConstants> & themeConstants,const RefPtr<PopupTheme> & theme)64 void ParsePattern(const RefPtr<ThemeConstants>& themeConstants, const RefPtr<PopupTheme>& theme) const 65 { 66 if (!theme) { 67 return; 68 } 69 RefPtr<ThemeStyle> pattern = themeConstants->GetPatternByName(THEME_PATTERN_POPUP); 70 if (!pattern) { 71 LOGW("find pattern of popup fail"); 72 return; 73 } 74 theme->maskColor_ = pattern->GetAttr<Color>("popup_mask_color", Color()); 75 theme->textStyle_.SetTextColor(pattern->GetAttr<Color>("popup_text_color", Color())); 76 theme->textStyle_.SetFontSize(pattern->GetAttr<Dimension>("popup_text_font_size", 0.0_vp)); 77 theme->backgroundColor_ = pattern->GetAttr<Color>(PATTERN_BG_COLOR, theme->backgroundColor_); 78 theme->fontSize_ = pattern->GetAttr<Dimension>(PATTERN_TEXT_SIZE, 14.0_fp); 79 theme->buttonFontSize_ = pattern->GetAttr<Dimension>(POPUP_BUTTON_TEXT_FONT_SIZE, 14.0_fp); 80 theme->fontColor_ = pattern->GetAttr<Color>(PATTERN_TEXT_COLOR, Color::WHITE); 81 theme->buttonHoverColor_ = pattern->GetAttr<Color>(PATTERN_BG_COLOR_HOVERED, Color()); 82 theme->buttonPressColor_ = pattern->GetAttr<Color>(PATTERN_BG_COLOR_PRESSED, Color()); 83 theme->focusColor_ = pattern->GetAttr<Color>(PATTERN_BG_COLOR_FOCUSED, Color()); 84 auto popupBorderRadius = pattern->GetAttr<Dimension>(POPUP_BORDER_RADIUS, BORDER_RADIUS_POPUP); 85 theme->radius_ = Radius(popupBorderRadius); 86 theme->padding_ = Edge(pattern->GetAttr<Dimension>(POPUP_HORIZONTAL_PADDING, 16.0_vp), 87 pattern->GetAttr<Dimension>(POPUP_VERTICAL_PADDING, 12.0_vp), 88 pattern->GetAttr<Dimension>(POPUP_HORIZONTAL_PADDING, 16.0_vp), 89 pattern->GetAttr<Dimension>(POPUP_VERTICAL_PADDING, 12.0_vp)); 90 auto popupDoubleBorderEnable = pattern->GetAttr<std::string>("popup_double_border_enable", "0"); 91 theme->popupDoubleBorderEnable_ = StringUtils::StringToInt(popupDoubleBorderEnable); 92 theme->popupOuterBorderWidth_ = pattern->GetAttr<Dimension>("popup_outer_border_width", 0.8_vp); 93 theme->popupOuterBorderColor_ = pattern->GetAttr<Color>("popup_outer_border_color", Color::TRANSPARENT); 94 theme->popupInnerBorderWidth_ = pattern->GetAttr<Dimension>("popup_inner_border_width", 0.8_vp); 95 theme->popupInnerBorderColor_ = pattern->GetAttr<Color>("popup_inner_border_color", Color::TRANSPARENT); 96 theme->buttonFontColor_ = pattern->GetAttr<Color>("text_primary_activated_color", Color::WHITE); 97 theme->fontPrimaryColor_ = pattern->GetAttr<Color>("text_primary_color", Color::WHITE); 98 theme->fontSecondaryColor_ = pattern->GetAttr<Color>("text_secondary_color", Color::WHITE); 99 theme->popupShadowStyle_ = static_cast<ShadowStyle>( 100 pattern->GetAttr<int>("popup_default_shadow_style", static_cast<int>(ShadowStyle::OuterDefaultMD))); 101 theme->popupBackgroundBlurStyle_ = pattern->GetAttr<int>( 102 "popup_background_blur_style", static_cast<int>(BlurStyle::COMPONENT_ULTRA_THICK)); 103 ParseAdditionalStylePattern(pattern, theme); 104 ParseTipsPattern(pattern, theme); 105 } ParseTipsPattern(const RefPtr<ThemeStyle> & pattern,const RefPtr<PopupTheme> & theme)106 void ParseTipsPattern(const RefPtr<ThemeStyle>& pattern, const RefPtr<PopupTheme>& theme) const 107 { 108 auto tipsDoubleBorderEnable = pattern->GetAttr<std::string>("tips_double_border_enable", "1"); 109 theme->tipsDoubleBorderEnable_ = StringUtils::StringToInt(tipsDoubleBorderEnable); 110 theme->tipsOuterBorderWidth_ = pattern->GetAttr<Dimension>("tips_outer_border_width", 1.0_vp); 111 theme->tipsOuterBorderColor_ = pattern->GetAttr<Color>("tips_outer_border_color", Color::TRANSPARENT); 112 theme->tipsInnerBorderWidth_ = pattern->GetAttr<Dimension>("tips_inner_border_width", 1.0_vp); 113 theme->tipsInnerBorderColor_ = pattern->GetAttr<Color>("tips_inner_border_color", Color::TRANSPARENT); 114 if (Container::CurrentColorMode() == ColorMode::DARK) { 115 theme->tipsOuterBorderWidth_ = pattern->GetAttr<Dimension>("tips_outer_border_width", 1.0_vp); 116 theme->tipsOuterBorderColor_ = 117 pattern->GetAttr<Color>("tips_outer_border_color_dark", Color::TRANSPARENT); 118 } 119 theme->tipsPadding_ = Edge(pattern->GetAttr<Dimension>("tips_horizontal_padding", 8.0_vp), 120 pattern->GetAttr<Dimension>("tips_vertical_padding", 8.0_vp), 121 pattern->GetAttr<Dimension>("tips_horizontal_padding", 8.0_vp), 122 pattern->GetAttr<Dimension>("tips_vertical_padding", 8.0_vp)); 123 } ParseAdditionalStylePattern(const RefPtr<ThemeStyle> & pattern,const RefPtr<PopupTheme> & theme)124 void ParseAdditionalStylePattern( 125 const RefPtr<ThemeStyle>& pattern, const RefPtr<PopupTheme>& theme) const 126 { 127 theme->targetSpace_ = pattern->GetAttr<Dimension>("popup_target_space", TARGET_SPACE); 128 theme->defaultBGColor_ = pattern->GetAttr<Color>("popup_default_bg_color", Color::TRANSPARENT); 129 theme->borderColor_ = pattern->GetAttr<Color>("popup_border_color", Color::BLACK); 130 theme->borderWidth_ = pattern->GetAttr<Dimension>("popup_border_width", 0.0_vp); 131 theme->minHeight_ = pattern->GetAttr<Dimension>("popup_min_height", 0.0_vp); 132 theme->popupMaxColumns_ = static_cast<uint32_t>(pattern->GetAttr<double>("popup_max_columns", 0)); 133 theme->bgThemeColorMode_ = static_cast<uint32_t>(pattern->GetAttr<double>("popup_bg_theme_color_mode", 0)); 134 theme->bubbleMiniMumHeight_ = 135 pattern->GetAttr<Dimension>("bubble_min_mum_height", theme->bubbleMiniMumHeight_); 136 theme->buttonHeight_ = pattern->GetAttr<Dimension>("popup_button_height", 40.0_vp); 137 theme->buttonType_ = pattern->GetAttr<int>("popup_button_type", static_cast<int>(ButtonType::CAPSULE)); 138 theme->buttonTextFontWeight_ = pattern->GetAttr<int>( 139 "popup_button_text_font_weight", static_cast<int>(FontWeight::REGULAR)); 140 theme->primaryButtonBackgroundColor_ = 141 pattern->GetAttr<Color>("popup_primary_button_background_color", Color::TRANSPARENT); 142 theme->secondaryButtonBackgroundColor_ = 143 pattern->GetAttr<Color>("popup_secondary_button_background_color", Color::TRANSPARENT); 144 theme->primaryButtonFontColor_ = pattern->GetAttr<Color>("popup_primary_button_font_color", Color::WHITE); 145 theme->secondaryButtonFontColor_ = 146 pattern->GetAttr<Color>("popup_secondary_button_font_color", Color::WHITE); 147 theme->buttonSpacingNewVersion_ = pattern->GetAttr<Dimension>("popup_button_space", 0.0_vp); 148 theme->buttonLeftMargin_ = pattern->GetAttr<Dimension>("popup_button_left_margin", 0.0_vp); 149 theme->buttonTopMargin_ = pattern->GetAttr<Dimension>("popup_button_top_margin", 0.0_vp); 150 theme->buttonBottomMargin_ = pattern->GetAttr<Dimension>("popup_button_bottom_margin", 4.0_vp); 151 theme->popupDoubleButtonIsSameStyle_ = pattern->GetAttr<int>("popup_double_button_is_same_style", 1); 152 } 153 }; 154 155 ~PopupTheme() override = default; 156 GetPadding()157 const Edge& GetPadding() const 158 { 159 return padding_; 160 } 161 GetTipsPadding()162 const Edge& GetTipsPadding() const 163 { 164 return tipsPadding_; 165 } 166 GetMaskColor()167 const Color& GetMaskColor() const 168 { 169 return maskColor_; 170 } 171 GetBackgroundColor()172 const Color& GetBackgroundColor() const 173 { 174 return backgroundColor_; 175 } 176 GetButtonHoverColor()177 const Color& GetButtonHoverColor() const 178 { 179 return buttonHoverColor_; 180 } 181 GetButtonBackgroundColor()182 const Color& GetButtonBackgroundColor() const 183 { 184 return buttonBackgroundColor_; 185 } 186 GetButtonPressColor()187 const Color& GetButtonPressColor() const 188 { 189 return buttonPressColor_; 190 } 191 GetFocusColor()192 const Color& GetFocusColor() const 193 { 194 return focusColor_; 195 } 196 GetTextStyle()197 const TextStyle& GetTextStyle() const 198 { 199 return textStyle_; 200 } 201 GetFontSize()202 const Dimension& GetFontSize() const 203 { 204 return fontSize_; 205 } 206 GetButtonFontSize()207 const Dimension& GetButtonFontSize() const 208 { 209 return buttonFontSize_; 210 } 211 GetFontColor()212 const Color& GetFontColor() const 213 { 214 return fontColor_; 215 } 216 GetRadius()217 const Radius& GetRadius() const 218 { 219 return radius_; 220 } 221 GetShowTime()222 uint32_t GetShowTime() const 223 { 224 return showTime_; 225 } 226 GetHideTime()227 uint32_t GetHideTime() const 228 { 229 return hideTime_; 230 } 231 GetTargetSpace()232 const Dimension& GetTargetSpace() const 233 { 234 return targetSpace_; 235 } 236 GetBubbleSpacing()237 const Dimension& GetBubbleSpacing() const 238 { 239 return bubbleSpacing_; 240 } 241 GetAgingTextLeftPadding()242 const Dimension& GetAgingTextLeftPadding() const 243 { 244 return ageTextLeftPadding_; 245 } 246 GetAgingTextRightPadding()247 const Dimension& GetAgingTextRightPadding() const 248 { 249 return ageTextRightPadding_; 250 } 251 GetAgingButtonTextLeftPadding()252 const Dimension& GetAgingButtonTextLeftPadding() const 253 { 254 return ageButtonTextLeftPadding_; 255 } 256 GetAgingButtonTextRightPadding()257 const Dimension& GetAgingButtonTextRightPadding() const 258 { 259 return ageButtonTextRightPadding_; 260 } 261 GetAgingButtonLeftPadding()262 const Dimension& GetAgingButtonLeftPadding() const 263 { 264 return ageButtonLeftPadding_; 265 } 266 GetAgingButtonRightPadding()267 const Dimension& GetAgingButtonRightPadding() const 268 { 269 return ageButtonRightPadding_; 270 } 271 GetButtonTextInsideMargin()272 const Dimension& GetButtonTextInsideMargin() const 273 { 274 return buttonTextInsideMargin_; 275 } 276 GetButtonSpacing()277 const Dimension& GetButtonSpacing() const 278 { 279 return buttonSpacing; 280 } 281 GetLittlePadding()282 const Dimension& GetLittlePadding() const 283 { 284 return littlePadding_; 285 } 286 GetFocusPaintWidth()287 const Dimension& GetFocusPaintWidth() const 288 { 289 return focusPaintWidth_; 290 } 291 GetButtonMiniMumWidth()292 const Dimension& GetButtonMiniMumWidth() const 293 { 294 return buttonMiniMumWidth; 295 } 296 GetBubbleMiniMumHeight()297 const Dimension& GetBubbleMiniMumHeight() const 298 { 299 return bubbleMiniMumHeight_; 300 } 301 GetArrowHeight()302 const Dimension& GetArrowHeight() const 303 { 304 return arrowHeight_; 305 } 306 GetPopupAnimationOffset()307 float GetPopupAnimationOffset() const 308 { 309 return popupAnimationOffset_; 310 } 311 GetShowDuration()312 int32_t GetShowDuration() const 313 { 314 return popupAnimationShowDuration_; 315 } 316 GetCloseDuration()317 int32_t GetCloseDuration() const 318 { 319 return popupAnimationCloseDuration_; 320 } GetHoverAnimationDuration()321 int32_t GetHoverAnimationDuration() const 322 { 323 return hoverAnimationDuration_; 324 } GetHoverToPressAnimationDuration()325 int32_t GetHoverToPressAnimationDuration() const 326 { 327 return hoverToPressAnimationDuration_; 328 } 329 GetOpacityStart()330 float GetOpacityStart() const 331 { 332 return opacityStart_; 333 } 334 GetOpacityEnd()335 float GetOpacityEnd() const 336 { 337 return opacityEnd_; 338 } 339 GetHoverOpacity()340 float GetHoverOpacity() const 341 { 342 return opacityHover_; 343 } 344 GetPressOpacity()345 float GetPressOpacity() const 346 { 347 return opacityPress_; 348 } 349 GetPopupDoubleBorderEnable()350 int32_t GetPopupDoubleBorderEnable() const 351 { 352 return popupDoubleBorderEnable_; 353 } 354 GetPopupOuterBorderWidth()355 Dimension GetPopupOuterBorderWidth() const 356 { 357 return popupOuterBorderWidth_; 358 } 359 GetPopupOuterBorderColor()360 Color GetPopupOuterBorderColor() const 361 { 362 return popupOuterBorderColor_; 363 } 364 GetPopupInnerBorderWidth()365 Dimension GetPopupInnerBorderWidth() const 366 { 367 return popupInnerBorderWidth_; 368 } 369 GetPopupInnerBorderColor()370 Color GetPopupInnerBorderColor() const 371 { 372 return popupInnerBorderColor_; 373 } 374 GetTipsDoubleBorderEnable()375 int32_t GetTipsDoubleBorderEnable() const 376 { 377 return tipsDoubleBorderEnable_; 378 } 379 GetTipsOuterBorderWidth()380 Dimension GetTipsOuterBorderWidth() const 381 { 382 return tipsOuterBorderWidth_; 383 } 384 GetTipsOuterBorderColor()385 Color GetTipsOuterBorderColor() const 386 { 387 return tipsOuterBorderColor_; 388 } 389 GetTipsInnerBorderWidth()390 Dimension GetTipsInnerBorderWidth() const 391 { 392 return tipsInnerBorderWidth_; 393 } 394 GetTipsInnerBorderColor()395 Color GetTipsInnerBorderColor() const 396 { 397 return tipsInnerBorderColor_; 398 } 399 GetButtonFontColor()400 Color GetButtonFontColor() const 401 { 402 return buttonFontColor_; 403 } 404 GetFontPrimaryColor()405 Color GetFontPrimaryColor() const 406 { 407 return fontPrimaryColor_; 408 } 409 GetFontSecondaryColor()410 Color GetFontSecondaryColor() const 411 { 412 return fontSecondaryColor_; 413 } 414 GetPopupShadowStyle()415 ShadowStyle GetPopupShadowStyle() const 416 { 417 return popupShadowStyle_; 418 } 419 GetPopupBackgroundBlurStyle()420 int GetPopupBackgroundBlurStyle() const 421 { 422 return popupBackgroundBlurStyle_; 423 } 424 GetDefaultBGColor()425 const Color& GetDefaultBGColor() const 426 { 427 return defaultBGColor_; 428 } 429 GetBorderColor()430 const Color& GetBorderColor() const 431 { 432 return borderColor_; 433 } 434 GetBorderWidth()435 const Dimension& GetBorderWidth() const 436 { 437 return borderWidth_; 438 } 439 GetMinHeight()440 const Dimension& GetMinHeight() const 441 { 442 return minHeight_; 443 } 444 GetMaxColumns()445 uint32_t GetMaxColumns() const 446 { 447 return popupMaxColumns_; 448 } 449 GetBgThemeColorMode()450 uint32_t GetBgThemeColorMode() const 451 { 452 return bgThemeColorMode_; 453 } 454 GetPopupButtonType()455 int GetPopupButtonType() const 456 { 457 return buttonType_; 458 } GetPrimaryButtonBackgroundColor()459 const Color& GetPrimaryButtonBackgroundColor() const 460 { 461 return primaryButtonBackgroundColor_; 462 } GetSecondaryButtonBackgroundColor()463 const Color& GetSecondaryButtonBackgroundColor() const 464 { 465 return secondaryButtonBackgroundColor_; 466 } GetPrimaryButtonFontColor()467 const Color& GetPrimaryButtonFontColor() const 468 { 469 return primaryButtonFontColor_; 470 } GetSecondaryButtonFontColor()471 const Color& GetSecondaryButtonFontColor() const 472 { 473 return secondaryButtonFontColor_; 474 } GetButtonLeftMargin()475 const Dimension& GetButtonLeftMargin() const 476 { 477 return buttonLeftMargin_; 478 } GetButtonTopMargin()479 const Dimension& GetButtonTopMargin() const 480 { 481 return buttonTopMargin_; 482 } GetButtonBottomMargin()483 const Dimension& GetButtonBottomMargin() const 484 { 485 return buttonBottomMargin_; 486 } GetButtonHeight()487 const Dimension& GetButtonHeight() const 488 { 489 return buttonHeight_; 490 } GetButtonTextFontWeight()491 int GetButtonTextFontWeight() const 492 { 493 return buttonTextFontWeight_; 494 } GetButtonSpacingNewVersion()495 const Dimension& GetButtonSpacingNewVersion() const 496 { 497 return buttonSpacingNewVersion_; 498 } GetPopupDoubleButtonIsSameStyle()499 int GetPopupDoubleButtonIsSameStyle() const 500 { 501 return popupDoubleButtonIsSameStyle_; 502 } 503 504 protected: 505 PopupTheme() = default; 506 507 private: 508 Edge padding_; 509 Edge tipsPadding_; 510 Color maskColor_; 511 Color backgroundColor_; 512 Color buttonHoverColor_ = Color(0x0cffffff); 513 Color buttonBackgroundColor_ = Color::TRANSPARENT; 514 Color buttonPressColor_ = Color(0x1affffff); 515 Color focusColor_ = Color::WHITE; 516 int32_t popupDoubleBorderEnable_ = 0; 517 Dimension popupOuterBorderWidth_ = 0.8_vp; 518 Color popupOuterBorderColor_ = Color::TRANSPARENT; 519 Dimension popupInnerBorderWidth_ = 0.8_vp; 520 Color popupInnerBorderColor_ = Color::TRANSPARENT; 521 int32_t tipsDoubleBorderEnable_ = 0; 522 Dimension tipsOuterBorderWidth_ = 1.0_vp; 523 Color tipsOuterBorderColor_ = Color::TRANSPARENT; 524 Dimension tipsInnerBorderWidth_ = 1.0_vp; 525 Color tipsInnerBorderColor_ = Color::TRANSPARENT; 526 527 TextStyle textStyle_; 528 Radius radius_; 529 uint32_t showTime_ = 0; 530 uint32_t hideTime_ = 0; 531 Dimension targetSpace_ = TARGET_SPACE; 532 Dimension fontSize_; 533 Dimension buttonFontSize_ = 14.0_fp; 534 Color fontColor_; 535 Dimension bubbleSpacing_ = 8.0_vp; 536 Dimension ageTextLeftPadding_ = 12.0_vp; 537 Dimension ageTextRightPadding_ = 12.0_vp; 538 Dimension ageButtonTextLeftPadding_ = 12.0_vp; 539 Dimension ageButtonTextRightPadding_ = 16.0_vp; 540 Dimension ageButtonLeftPadding_ = 0.0_vp; 541 Dimension ageButtonRightPadding_ = 0.0_vp; 542 Dimension buttonTextInsideMargin_ = 8.0_vp; 543 Dimension buttonSpacing = 4.0_vp; 544 Dimension littlePadding_ = 4.0_vp; 545 Dimension arrowHeight_ = 8.0_vp; 546 Dimension focusPaintWidth_ = 2.0_vp; 547 Dimension buttonMiniMumWidth = 72.0_vp; 548 Dimension bubbleMiniMumHeight_ = 48.0_vp; 549 float popupAnimationOffset_ = 8.0f; 550 int32_t popupAnimationShowDuration_ = 250; 551 int32_t popupAnimationCloseDuration_ = 100; 552 int32_t hoverAnimationDuration_ = 250; 553 int32_t hoverToPressAnimationDuration_ = 100; 554 float opacityStart_ = 0.0f; 555 float opacityEnd_ = 1.0f; 556 float opacityHover_ = 0.05f; 557 float opacityPress_ = 0.1f; 558 Color buttonFontColor_; 559 Color fontPrimaryColor_; 560 Color fontSecondaryColor_; 561 ShadowStyle popupShadowStyle_ = ShadowStyle::OuterDefaultMD; 562 int popupBackgroundBlurStyle_ = static_cast<int>(BlurStyle::COMPONENT_ULTRA_THICK); 563 Color defaultBGColor_; 564 Color borderColor_; 565 Dimension borderWidth_ = 0.0_vp; 566 Dimension minHeight_ = 0.0_vp; 567 uint32_t popupMaxColumns_ = 0; 568 uint32_t bgThemeColorMode_ = 0; 569 int buttonType_ = static_cast<int>(ButtonType::CAPSULE); 570 Color primaryButtonBackgroundColor_ = Color::TRANSPARENT; 571 Color secondaryButtonBackgroundColor_ = Color::TRANSPARENT; 572 Color primaryButtonFontColor_ = Color::WHITE; 573 Color secondaryButtonFontColor_ = Color::WHITE; 574 Dimension buttonLeftMargin_ = 0.0_vp; 575 Dimension buttonTopMargin_ = 0.0_vp; 576 Dimension buttonBottomMargin_ = 4.0_vp; 577 Dimension buttonHeight_ = 40.0_vp; 578 int buttonTextFontWeight_ = static_cast<int>(FontWeight::REGULAR); 579 Dimension buttonSpacingNewVersion_ = 0.0_vp; 580 int popupDoubleButtonIsSameStyle_ = 1; 581 }; 582 583 } // namespace OHOS::Ace 584 585 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_POPUP_POPUP_THEME_H 586