!40302 修复第一次拉起半模态且隐藏拖拽条情况下,拖拽条未占位

Merge pull request !40302 from chenxiaoxue/cherry-pick-1723516689
This commit is contained in:
openharmony_ci 2024-08-13 14:28:28 +00:00 committed by Gitee
commit 28e8a0e978
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -124,7 +124,11 @@ void SheetView::CreateDragBarNode(const RefPtr<FrameNode>& titleBuilder, const R
isSingleDetents = sheetStyle.detents[0] == sheetStyle.detents[1] &&
sheetStyle.detents[1] == sheetStyle.detents[SHEET_DETENTS_TWO];
}
if (!isSingleDetents && showDragIndicator) {
// 1. showDragBar && not single detents
// 2. has SystemTitleBar
// need set drag bar invisible to occupy place
if ((!isSingleDetents && showDragIndicator) || sheetStyle.isTitleBuilder.has_value()) {
dragBarLayoutProperty->UpdateVisibility(VisibleType::INVISIBLE);
} else {
dragBarLayoutProperty->UpdateVisibility(VisibleType::GONE);