!49276 set containerNode ClipToBounds to true

Merge pull request !49276 from 解强龙/cache_1123
This commit is contained in:
openharmony_ci 2024-11-23 06:57:34 +00:00 committed by Gitee
commit 3057b82f95
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 2 additions and 0 deletions

View File

@ -82,6 +82,7 @@ void ContainerModalPattern::ShowTitle(bool isShow, bool hasDeco, bool needUpdate
auto renderContext = containerNode->GetRenderContext(); auto renderContext = containerNode->GetRenderContext();
CHECK_NULL_VOID(renderContext); CHECK_NULL_VOID(renderContext);
renderContext->SetClipToBounds(true);
renderContext->UpdateBackgroundColor(GetContainerColor(isFocus_)); renderContext->UpdateBackgroundColor(GetContainerColor(isFocus_));
BorderRadiusProperty borderRadius; BorderRadiusProperty borderRadius;
borderRadius.SetRadius(isShow ? CONTAINER_OUTER_RADIUS : 0.0_vp); borderRadius.SetRadius(isShow ? CONTAINER_OUTER_RADIUS : 0.0_vp);

View File

@ -195,6 +195,7 @@ void ContainerModalPatternEnhance::ShowTitle(bool isShow, bool hasDeco, bool nee
layoutProperty->UpdateBorderWidth(borderWidth); layoutProperty->UpdateBorderWidth(borderWidth);
auto renderContext = containerNode->GetRenderContext(); auto renderContext = containerNode->GetRenderContext();
CHECK_NULL_VOID(renderContext); CHECK_NULL_VOID(renderContext);
renderContext->SetClipToBounds(true);
renderContext->UpdateBackgroundColor(GetContainerColor(isFocus_)); renderContext->UpdateBackgroundColor(GetContainerColor(isFocus_));
// only floating window show border // only floating window show border
BorderRadiusProperty borderRadius; BorderRadiusProperty borderRadius;