!36898 圆形按钮不做适老化

Merge pull request !36898 from sunjiakun/button_adapt_old
This commit is contained in:
openharmony_ci 2024-07-04 12:54:15 +00:00 committed by Gitee
commit bc392818c7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 8 additions and 0 deletions

View File

@ -352,6 +352,10 @@ bool ButtonLayoutAlgorithm::IsAging(LayoutWrapper* layoutWrapper)
auto buttonLayoutProperty = DynamicCast<ButtonLayoutProperty>(layoutWrapper->GetLayoutProperty());
CHECK_NULL_RETURN(buttonLayoutProperty, false);
if (buttonLayoutProperty->HasType() && buttonLayoutProperty->GetType() == ButtonType::CIRCLE) {
return false;
}
if (buttonLayoutProperty->HasLabel() && buttonLayoutProperty->GetLabel()->empty()) {
return false;
}

View File

@ -71,6 +71,10 @@ bool ButtonPattern::NeedAgingUpdateText(RefPtr<ButtonLayoutProperty>& layoutProp
CHECK_NULL_RETURN(buttonTheme, false);
auto fontScale = pipeline->GetFontScale();
if (layoutProperty->HasType() && layoutProperty->GetType() == ButtonType::CIRCLE) {
return false;
}
if (layoutProperty->HasLabel() && layoutProperty->GetLabel()->empty()) {
return false;
}