diff --git a/frameworks/bridge/declarative_frontend/ark_theme/theme_apply/js_text_clock_theme.h b/frameworks/bridge/declarative_frontend/ark_theme/theme_apply/js_text_clock_theme.h deleted file mode 100644 index 288b957ba05219e70441d8034c2bd0b6bbc407d2..0000000000000000000000000000000000000000 --- a/frameworks/bridge/declarative_frontend/ark_theme/theme_apply/js_text_clock_theme.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef FRAMEWORKS_BRIDGE_DECLARATIVE_FRONTEND_THEME_JS_TEXT_CLOCK_THEME_H -#define FRAMEWORKS_BRIDGE_DECLARATIVE_FRONTEND_THEME_JS_TEXT_CLOCK_THEME_H - -#include "bridge/declarative_frontend/ark_theme/theme_apply/js_theme_utils.h" -#include "core/components_ng/base/view_stack_model.h" -#include "core/components_ng/pattern/text_clock/text_clock_model.h" - -namespace OHOS::Ace::Framework { -class JSTextClockTheme { -public: - static void ApplyTheme() - { - if (auto themeColors = JSThemeUtils::GetThemeColors(); themeColors.has_value()) { - TextClockModel::GetInstance()->SetTextColor(themeColors->FontSecondary()); - } - } - - static bool ObtainTextColor(Color &color) - { - if (auto themeColors = JSThemeUtils::GetThemeColors(); themeColors.has_value()) { - color = themeColors->FontSecondary(); - return true; - } - return false; - } -}; -} // namespace OHOS::Ace::Framework -#endif // FRAMEWORKS_BRIDGE_DECLARATIVE_FRONTEND_THEME_JS_TEXT_CLOCK_THEME_H \ No newline at end of file diff --git a/frameworks/bridge/declarative_frontend/ark_theme/theme_manager/src/theme/ArkThemeWhiteList.ts b/frameworks/bridge/declarative_frontend/ark_theme/theme_manager/src/theme/ArkThemeWhiteList.ts index 1eab6a0068fdbed803abd42a4268aa80301db198..73469ec31f9e72b1cb8dbb2fcf2df1ba99f941bc 100644 --- a/frameworks/bridge/declarative_frontend/ark_theme/theme_manager/src/theme/ArkThemeWhiteList.ts +++ b/frameworks/bridge/declarative_frontend/ark_theme/theme_manager/src/theme/ArkThemeWhiteList.ts @@ -28,7 +28,6 @@ class ArkThemeWhiteList { 'MenuItem', 'Search', 'Select', - 'TextClock', 'TextPicker', 'TimePicker', 'Toggle', diff --git a/frameworks/bridge/declarative_frontend/engine/arkTheme.js b/frameworks/bridge/declarative_frontend/engine/arkTheme.js index 13dea0ecac6008929408252363e900f8de759482..424742e1d3c908509554af60ff3cb9f55e3a29d5 100644 --- a/frameworks/bridge/declarative_frontend/engine/arkTheme.js +++ b/frameworks/bridge/declarative_frontend/engine/arkTheme.js @@ -1082,7 +1082,6 @@ ArkThemeWhiteList.whiteList = [ 'MenuItem', 'Search', 'Select', - 'TextClock', 'TextPicker', 'TimePicker', 'Toggle', diff --git a/frameworks/bridge/declarative_frontend/engine/jsi/nativeModule/arkts_native_text_clock_bridge.cpp b/frameworks/bridge/declarative_frontend/engine/jsi/nativeModule/arkts_native_text_clock_bridge.cpp index 9e9a71d846256666027674f673c9d654d037cca6..c3b057812323778de33a58539a6c6eb190810a96 100644 --- a/frameworks/bridge/declarative_frontend/engine/jsi/nativeModule/arkts_native_text_clock_bridge.cpp +++ b/frameworks/bridge/declarative_frontend/engine/jsi/nativeModule/arkts_native_text_clock_bridge.cpp @@ -16,7 +16,6 @@ #include "base/utils/string_utils.h" #include "base/utils/utils.h" -#include "bridge/declarative_frontend/ark_theme/theme_apply/js_text_clock_theme.h" #include "core/components_ng/base/frame_node.h" #include "core/components_ng/pattern/text_clock/text_clock_model_ng.h" #include "frameworks/base/geometry/calc_dimension.h" @@ -415,15 +414,10 @@ ArkUINativeModuleValue TextClockBridge::SetTextClockTimeZoneOffset(ArkUIRuntimeC Local nodeVal = runtimeCallInfo->GetCallArgRef(NUM_0); Local hourWestVal = runtimeCallInfo->GetCallArgRef(NUM_1); auto nativeNode = nodePtr(nodeVal->ToNativePointer(vm)->Value()); - auto themeColors = Framework::JSThemeUtils::GetThemeColors(); float hourWest = NAN; if (hourWestVal->IsNumber() && HoursWestIsValid(hourWestVal->Int32Value(vm))) { hourWest = GetHoursWest(hourWestVal->ToNumber(vm)->Value()); } - if (themeColors.has_value()) { - GetArkUINodeModifiers()->getTextClockModifier()->setFontColor( - nativeNode, themeColors->FontSecondary().GetValue()); - } GetArkUINodeModifiers()->getTextClockModifier()->setTextClockTimeZoneOffset(nativeNode, hourWest); return panda::JSValueRef::Undefined(vm); } @@ -435,12 +429,6 @@ ArkUINativeModuleValue TextClockBridge::SetTextClockController(ArkUIRuntimeCallI Local nodeVal = runtimeCallInfo->GetCallArgRef(NUM_0); Local controllerVal = runtimeCallInfo->GetCallArgRef(NUM_1); auto nativeNode = nodePtr(nodeVal->ToNativePointer(vm)->Value()); - auto themeColors = Framework::JSThemeUtils::GetThemeColors(); - if (themeColors.has_value()) { - GetArkUINodeModifiers()->getTextClockModifier()->setFontColor( - nativeNode, themeColors->FontSecondary().GetValue()); - } - auto* frameNode = reinterpret_cast(nativeNode); CHECK_NULL_RETURN(frameNode, panda::JSValueRef::Undefined(vm)); auto controller = TextClockModelNG::InitTextController(frameNode); diff --git a/frameworks/bridge/declarative_frontend/jsview/js_text_clock.cpp b/frameworks/bridge/declarative_frontend/jsview/js_text_clock.cpp index fadd6a4d101200de54269bfbe6ed5c8e031c10c3..b1111ffb60392a51ba13497fc42d815365d3c917 100644 --- a/frameworks/bridge/declarative_frontend/jsview/js_text_clock.cpp +++ b/frameworks/bridge/declarative_frontend/jsview/js_text_clock.cpp @@ -24,7 +24,6 @@ #include "bridge/declarative_frontend/jsview/js_view_common_def.h" #include "bridge/declarative_frontend/jsview/js_utils.h" #include "bridge/declarative_frontend/jsview/models/text_clock_model_impl.h" -#include "bridge/declarative_frontend/ark_theme/theme_apply/js_text_clock_theme.h" #include "core/components/common/properties/text_style.h" #include "core/components/common/properties/text_style_parser.h" #include "core/components_ng/base/view_stack_processor.h" @@ -90,12 +89,9 @@ float GetHoursWest(float hoursWest) void JSTextClock::Create(const JSCallbackInfo& info) { auto controller = TextClockModel::GetInstance()->Create(); - if (info.Length() < 1 || !info[0]->IsObject()) { - SetFontDefault(); - JSTextClockTheme::ApplyTheme(); + if (info.Length() < 1 || !info[0]->IsObject()) { return; } - JSTextClockTheme::ApplyTheme(); JSRef optionsObject = JSRef::Cast(info[0]); JSRef hourWestVal = optionsObject->GetProperty("timeZoneOffset"); if (hourWestVal->IsNumber() && HoursWestIsValid(hourWestVal->ToNumber())) { @@ -143,25 +139,16 @@ void JSTextClock::JSBind(BindingTarget globalObj) JSClass::InheritAndBind(globalObj); } -void JSTextClock::SetFontDefault() -{ - RefPtr textTheme = GetTheme(); - TextClockModel::GetInstance()->InitFontDefault(textTheme->GetTextStyle()); -} - void JSTextClock::SetTextColor(const JSCallbackInfo& info) { if (info.Length() < 1) { return; } Color textColor; - if (!ParseJsColor(info[0], textColor) && !JSTextClockTheme::ObtainTextColor(textColor)) { - auto pipelineContext = PipelineContext::GetCurrentContext(); - CHECK_NULL_VOID(pipelineContext); - auto theme = pipelineContext->GetTheme(); - textColor = theme->GetTextStyle().GetTextColor(); + if (!ParseJsColor(info[0], textColor)) { + TextClockModel::GetInstance()->ResetTextColor(); + return; } - TextClockModel::GetInstance()->SetTextColor(textColor); } diff --git a/frameworks/bridge/declarative_frontend/jsview/js_text_clock.h b/frameworks/bridge/declarative_frontend/jsview/js_text_clock.h index 9ef0576ebadf621db4d2a507e1b8446bbc7ae737..23feb83c704989b31d3d44061877c824c5e5f45f 100644 --- a/frameworks/bridge/declarative_frontend/jsview/js_text_clock.h +++ b/frameworks/bridge/declarative_frontend/jsview/js_text_clock.h @@ -35,9 +35,6 @@ public: static void SetTextShadow(const JSCallbackInfo& info); static void SetFontFeature(const JSCallbackInfo& info); static void SetDateTimeOptions(const JSCallbackInfo& info); - -protected: - static void SetFontDefault(); }; class JSTextClockController final : public Referenced { diff --git a/frameworks/bridge/declarative_frontend/jsview/models/text_clock_model_impl.h b/frameworks/bridge/declarative_frontend/jsview/models/text_clock_model_impl.h index 0680eb28b7105f45d92ba70428ae530041d4c7c5..5de0ec4e10bb69c95a35b89505769abd7adaa801 100644 --- a/frameworks/bridge/declarative_frontend/jsview/models/text_clock_model_impl.h +++ b/frameworks/bridge/declarative_frontend/jsview/models/text_clock_model_impl.h @@ -30,6 +30,7 @@ public: void SetOnDateChange(std::function&& onChange) override; void SetFontSize(const Dimension& value) override; void SetTextColor(const Color& value) override; + void ResetTextColor() override {}; void SetItalicFontStyle(Ace::FontStyle value) override; void SetFontWeight(FontWeight value) override; void SetFontFamily(const std::vector& value) override; diff --git a/frameworks/core/components/common/properties/text_style.h b/frameworks/core/components/common/properties/text_style.h index 4bc74fc9ab9e5f24bb32aa3f51c7f4e348d7cc75..db4c4c86beb812c44b61817df004f5057a5171d1 100644 --- a/frameworks/core/components/common/properties/text_style.h +++ b/frameworks/core/components/common/properties/text_style.h @@ -248,6 +248,7 @@ public: TextStyle(const std::vector& fontFamilies, double fontSize, FontWeight fontWeight, FontStyle fontStyle, const Color& textColor); TextStyle(double fontSize) : fontSize_(fontSize) {} + TextStyle(const Color& textColor) : textColor_(textColor) {} ~TextStyle() = default; bool operator==(const TextStyle& rhs) const; diff --git a/frameworks/core/components/text/text_theme.h b/frameworks/core/components/text/text_theme.h index 57aa9a59bf5eb06e9f986c5a39288412265fe83c..d894ea98e16d91c6f88cf9799d56a47159f3adf0 100644 --- a/frameworks/core/components/text/text_theme.h +++ b/frameworks/core/components/text/text_theme.h @@ -56,6 +56,15 @@ public: theme->textStyle_.SetFontStyle(FontStyle::NORMAL); theme->textStyle_.SetFontWeight(FontWeight::NORMAL); theme->textStyle_.SetTextDecoration(TextDecoration::NONE); + InitThemeDefaultsClock(theme); + } + + void InitThemeDefaultsClock(const RefPtr& theme) const + { + // Styles below do not need to get from ThemeConstants, directly set at here. + theme->textStyleClock_.SetFontStyle(FontStyle::NORMAL); + theme->textStyleClock_.SetFontWeight(FontWeight::NORMAL); + theme->textStyleClock_.SetTextDecoration(TextDecoration::NONE); } void ParsePattern(const RefPtr& themeConstants, const RefPtr& theme) const @@ -68,6 +77,9 @@ public: theme->textStyle_.SetTextColor(pattern->GetAttr(PATTERN_TEXT_COLOR, Color::BLACK) .BlendOpacity(pattern->GetAttr(PATTERN_TEXT_COLOR_ALPHA, 0.9))); theme->textStyle_.SetFontSize(pattern->GetAttr("text_font_size", 0.0_vp)); + theme->textStyleClock_.SetTextColor(pattern->GetAttr(PATTERN_TEXT_COLOR, Color::GRAY) + .BlendOpacity(pattern->GetAttr(PATTERN_TEXT_COLOR_ALPHA, 0.9))); + theme->textStyleClock_.SetFontSize(pattern->GetAttr("text_font_size", 0.0_vp)); theme->selectedColor_ = pattern->GetAttr(PATTERN_BG_COLOR_SELECTED, Color(0x33007dff)); auto draggable = pattern->GetAttr("draggable", "0"); theme->draggable_ = StringUtils::StringToInt(draggable); @@ -90,6 +102,11 @@ public: return textStyle_; } + const TextStyle& GetTextStyleClock() const + { + return textStyleClock_; + } + const Color& GetSelectedColor() const { return selectedColor_; @@ -119,6 +136,7 @@ protected: TextTheme() = default; TextStyle textStyle_; + TextStyle textStyleClock_; private: Color selectedColor_; diff --git a/frameworks/core/components_ng/pattern/text/text_theme_wrapper.h b/frameworks/core/components_ng/pattern/text/text_theme_wrapper.h index dee17c309ab089e6f67fed6927aad83a69f50d3a..4520445767a6b163afc349cc323bb2d4616d120d 100644 --- a/frameworks/core/components_ng/pattern/text/text_theme_wrapper.h +++ b/frameworks/core/components_ng/pattern/text/text_theme_wrapper.h @@ -58,6 +58,7 @@ public: { if (auto colors = theme.Colors(); colors) { textStyle_.SetTextColor(colors->FontPrimary()); + textStyleClock_.SetTextColor(colors->FontSecondary()); } } diff --git a/frameworks/core/components_ng/pattern/text_clock/text_clock_layout_property.cpp b/frameworks/core/components_ng/pattern/text_clock/text_clock_layout_property.cpp index 3ed8cca711c9807bfac101a7dabd13184904b65c..a72b4c74b6b3a482d98a051e86ddfc311b03f298 100644 --- a/frameworks/core/components_ng/pattern/text_clock/text_clock_layout_property.cpp +++ b/frameworks/core/components_ng/pattern/text_clock/text_clock_layout_property.cpp @@ -87,6 +87,13 @@ void TextClockLayoutProperty::ToJsonValue(std::unique_ptr& json, cons if (filter.IsFastFilter()) { return; } + + auto host = GetHost(); + auto themeScopeId = host ? host->GetThemeScopeId() : 0; + auto pipelineContext = PipelineContext::GetCurrentContext(); + auto theme = pipelineContext->GetTheme(themeScopeId); + auto defaultColor = theme ? theme->GetTextStyleClock().GetTextColor() : Color::BLACK; + if (AceApplicationInfo::GetInstance().GreatOrEqualTargetAPIVersion(PlatformVersion::VERSION_ELEVEN)) { json->PutExtAttr("format", propFormat_.value_or(DEFAULT_FORMAT_API_ELEVEN).c_str(), filter); } else { @@ -95,7 +102,7 @@ void TextClockLayoutProperty::ToJsonValue(std::unique_ptr& json, cons json->PutExtAttr("timeZoneOffset", std::to_string(propHoursWest_.value_or(GetSystemTimeZone())).c_str(), filter); json->PutExtAttr("fontSize", GetFontSize().value_or(Dimension()).ToString().c_str(), filter); - json->PutExtAttr("fontColor", GetTextColor().value_or(Color::BLACK).ColorToString().c_str(), filter); + json->PutExtAttr("fontColor", GetTextColor().value_or(defaultColor).ColorToString().c_str(), filter); json->PutExtAttr("fontWeight", V2::ConvertWrapFontWeightToStirng(GetFontWeight().value_or(FontWeight::NORMAL)).c_str(), filter); json->PutExtAttr("fontStyle", diff --git a/frameworks/core/components_ng/pattern/text_clock/text_clock_model.h b/frameworks/core/components_ng/pattern/text_clock/text_clock_model.h index be8739bc01b95c6cf2fb39e850831b2339978281..2422e4b13600d62436f8b9e96d8ec28f4a896099 100644 --- a/frameworks/core/components_ng/pattern/text_clock/text_clock_model.h +++ b/frameworks/core/components_ng/pattern/text_clock/text_clock_model.h @@ -35,6 +35,7 @@ public: virtual void SetOnDateChange(std::function&& onChange) = 0; virtual void SetFontSize(const Dimension& value) = 0; virtual void SetTextColor(const Color& value) = 0; + virtual void ResetTextColor() = 0; virtual void SetItalicFontStyle(Ace::FontStyle value) = 0; virtual void SetFontWeight(FontWeight value) = 0; virtual void SetFontFamily(const std::vector& value) = 0; diff --git a/frameworks/core/components_ng/pattern/text_clock/text_clock_model_ng.cpp b/frameworks/core/components_ng/pattern/text_clock/text_clock_model_ng.cpp index 80ebe577f24ffab014b2710632c6473c326364ab..7033fa0267ce4a064d9d5a64bf4ec152ef632f8d 100644 --- a/frameworks/core/components_ng/pattern/text_clock/text_clock_model_ng.cpp +++ b/frameworks/core/components_ng/pattern/text_clock/text_clock_model_ng.cpp @@ -87,6 +87,14 @@ void TextClockModelNG::SetTextColor(const Color& value) ACE_UPDATE_RENDER_CONTEXT(ForegroundColorFlag, true); } +void TextClockModelNG::ResetTextColor() +{ + ACE_RESET_LAYOUT_PROPERTY_WITH_FLAG(TextClockLayoutProperty, TextColor, PROPERTY_UPDATE_MEASURE_SELF); + ACE_RESET_RENDER_CONTEXT(RenderContext, ForegroundColor); + ACE_RESET_RENDER_CONTEXT(RenderContext, ForegroundColorStrategy); + ACE_RESET_RENDER_CONTEXT(RenderContext, ForegroundColorFlag); +} + void TextClockModelNG::SetItalicFontStyle(Ace::FontStyle value) { ACE_UPDATE_LAYOUT_PROPERTY(TextClockLayoutProperty, ItalicFontStyle, value); @@ -146,9 +154,9 @@ RefPtr TextClockModelNG::CreateFrameNode(int32_t nodeId) } auto pipeline = textClockNode->GetContextRefPtr(); CHECK_NULL_RETURN(pipeline, nullptr); - auto textTheme = pipeline->GetTheme(); + auto textTheme = pipeline->GetTheme(textClockNode->GetThemeScopeId()); if (textTheme) { - InitFontDefault(AceType::RawPtr(textClockNode), textTheme->GetTextStyle()); + InitFontDefault(AceType::RawPtr(textClockNode), textTheme->GetTextStyleClock()); } return textClockNode; } diff --git a/frameworks/core/components_ng/pattern/text_clock/text_clock_model_ng.h b/frameworks/core/components_ng/pattern/text_clock/text_clock_model_ng.h index c92834f632ed96fba63a4ad93b2dabc9f7628088..88f3c5cecda976d041ac6aebe7ad8f6cff90aaf9 100644 --- a/frameworks/core/components_ng/pattern/text_clock/text_clock_model_ng.h +++ b/frameworks/core/components_ng/pattern/text_clock/text_clock_model_ng.h @@ -39,6 +39,7 @@ public: void SetOnDateChange(std::function&& onChange) override; void SetFontSize(const Dimension& value) override; void SetTextColor(const Color& value) override; + void ResetTextColor() override; void SetItalicFontStyle(Ace::FontStyle value) override; void SetFontWeight(FontWeight value) override; void SetFontFamily(const std::vector& value) override; diff --git a/frameworks/core/components_ng/pattern/text_clock/text_clock_pattern.cpp b/frameworks/core/components_ng/pattern/text_clock/text_clock_pattern.cpp index 7b5556c6a1df18772b911100a16d85053fabbd24..3209ad72d216d5794ca5adc6e212b8b4736032c9 100644 --- a/frameworks/core/components_ng/pattern/text_clock/text_clock_pattern.cpp +++ b/frameworks/core/components_ng/pattern/text_clock/text_clock_pattern.cpp @@ -112,7 +112,7 @@ void TextClockPattern::OnDetachFromFrameNode(FrameNode* frameNode) } void TextClockPattern::UpdateTextLayoutProperty( - RefPtr& layoutProperty, RefPtr& textLayoutProperty) + RefPtr& layoutProperty, RefPtr& textLayoutProperty, const TextStyle& textStyleTheme) { if (layoutProperty->GetFontSize().has_value()) { textLayoutProperty->UpdateFontSize(layoutProperty->GetFontSize().value()); @@ -120,9 +120,10 @@ void TextClockPattern::UpdateTextLayoutProperty( if (layoutProperty->GetFontWeight().has_value()) { textLayoutProperty->UpdateFontWeight(layoutProperty->GetFontWeight().value()); } - if (layoutProperty->GetTextColor().has_value()) { - textLayoutProperty->UpdateTextColor(layoutProperty->GetTextColor().value()); - } + + textLayoutProperty->UpdateTextColor(layoutProperty->GetTextColor().has_value() ? + layoutProperty->GetTextColor().value() : textStyleTheme.GetTextColor()); + if (layoutProperty->GetFontFamily().has_value() && !layoutProperty->GetFontFamily().value().empty()) { textLayoutProperty->UpdateFontFamily(layoutProperty->GetFontFamily().value()); } @@ -137,6 +138,22 @@ void TextClockPattern::UpdateTextLayoutProperty( } } +bool TextClockPattern::OnThemeScopeUpdate(int32_t themeScopeId) { + auto host = GetHost(); + CHECK_NULL_RETURN(host, false); + auto textNode = GetTextNode(); + CHECK_NULL_RETURN(textNode, false); + auto textClockProperty = host->GetLayoutProperty(); + CHECK_NULL_RETURN(textClockProperty, false); + + if (!textClockProperty->HasTextColor()) { + host->MarkDirtyNode(PROPERTY_UPDATE_MEASURE_SELF_AND_PARENT); + textNode->MarkModifyDone(); + OnModifyDone(); + } + return false; +} + void TextClockPattern::OnModifyDone() { auto host = GetHost(); @@ -147,8 +164,14 @@ void TextClockPattern::OnModifyDone() CHECK_NULL_VOID(textLayoutProperty); auto textClockProperty = host->GetLayoutProperty(); CHECK_NULL_VOID(textClockProperty); + + auto pipeline = PipelineBase::GetCurrentContext(); + CHECK_NULL_VOID(pipeline); + auto textTheme = pipeline->GetTheme(host->GetThemeScopeId()); + CHECK_NULL_VOID(textTheme); + textLayoutProperty->UpdateTextOverflow(TextOverflow::NONE); - UpdateTextLayoutProperty(textClockProperty, textLayoutProperty); + UpdateTextLayoutProperty(textClockProperty, textLayoutProperty, textTheme->GetTextStyleClock()); hourWest_ = GetHoursWest(); delayTask_.Cancel(); UpdateTimeText(); diff --git a/frameworks/core/components_ng/pattern/text_clock/text_clock_pattern.h b/frameworks/core/components_ng/pattern/text_clock/text_clock_pattern.h index 35063d2110dfbc9bc8ddc50bc88ff9e8f266f989..b5b4f8fba0ba7b21d642283a02430124d9a29ee6 100644 --- a/frameworks/core/components_ng/pattern/text_clock/text_clock_pattern.h +++ b/frameworks/core/components_ng/pattern/text_clock/text_clock_pattern.h @@ -122,6 +122,8 @@ public: return textClockLayoutProperty->GetPrefixHourValue(ZeroPrefixType::AUTO); } + bool OnThemeScopeUpdate(int32_t themeScopeId) override; + private: void OnModifyDone() override; void OnAttachToFrameNode() override; @@ -140,7 +142,7 @@ private: void RegistVisibleAreaChangeCallback(); void OnVisibleAreaChange(bool visible); static void UpdateTextLayoutProperty( - RefPtr& layoutProperty, RefPtr& textLayoutProperty); + RefPtr& layoutProperty, RefPtr& textLayoutProperty, const TextStyle& textStyleTheme); void ParseInputFormat(); std::vector ParseDateTimeValue(const std::string& strDateTimeValue); void GetDateTimeIndex(const char& element, TextClockFormatElement& tempFormatElement);