!9559 字体不跟随问题修复

Merge pull request !9559 from songjindian/fix_font
This commit is contained in:
openharmony_ci 2024-07-23 11:27:53 +00:00 committed by Gitee
commit aa0e5be02f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -446,7 +446,6 @@ void OHOSApplication::OnConfigurationUpdated(Configuration config)
std::string language = config.GetItem(AAFwk::GlobalConfigurationKey::SYSTEM_LANGUAGE);
std::string colorMode = config.GetItem(AAFwk::GlobalConfigurationKey::SYSTEM_COLORMODE);
std::string fontSizeScal = config.GetItem(AAFwk::GlobalConfigurationKey::SYSTEM_FONT_SIZE_SCALE);
std::string fontWeightScale = config.GetItem(AAFwk::GlobalConfigurationKey::SYSTEM_FONT_WEIGHT_SCALE);
std::string languageIsSetByApp =
config.GetItem(AAFwk::GlobalConfigurationKey::LANGUAGE_IS_SET_BY_APP);
std::string colorModeIsSetByApp =
@ -484,7 +483,7 @@ void OHOSApplication::OnConfigurationUpdated(Configuration config)
return;
}
}
if (!fontSizeScal.empty() || !fontWeightScale.empty()) {
if (!fontSizeScal.empty()) {
if (!globalFontFollowSysteme.empty()
&& globalFontFollowSysteme.compare(ConfigurationInner::IS_APP_FONT_FOLLOW_SYSTEM) != 0) {
TAG_LOGW(AAFwkTag::APPKIT, "the font configured for the app does not take effect with the system");