!47010 修复弹窗位置错误,点击文本,分享界面收起

Merge pull request !47010 from 林昊/calendar_had
This commit is contained in:
openharmony_ci 2024-11-02 10:21:38 +00:00 committed by Gitee
commit ea05ce954d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 1 deletions

View File

@ -2750,6 +2750,7 @@ void MenuLayoutAlgorithm::InitCanExpandCurrentWindow(bool isShowInSubWindow)
isExpandDisplay_ = theme->GetExpandDisplay() || isFreeMultiWindow_;
if (isExpandDisplay_ && !isShowInSubWindow && containerId >= MIN_SUBCONTAINER_ID) {
canExpandCurrentWindow_ = true;
isTargetNodeInSubwindow_ = true;
return;
}
canExpandCurrentWindow_ = isExpandDisplay_ && isShowInSubWindow;
@ -2798,7 +2799,7 @@ Rect MenuLayoutAlgorithm::GetMenuWindowRectInfo(const RefPtr<MenuPattern>& menuP
void MenuLayoutAlgorithm::ModifyTargetOffset()
{
TAG_LOGI(AceLogTag::ACE_MENU, "original targetOffset is : %{public}s", targetOffset_.ToString().c_str());
if (canExpandCurrentWindow_ && isExpandDisplay_) {
if (canExpandCurrentWindow_ && isExpandDisplay_ && !isTargetNodeInSubwindow_) {
targetOffset_ += displayWindowRect_.GetOffset();
TAG_LOGI(AceLogTag::ACE_MENU, "ModifyTargetOffset for displayAvailableRect : %{public}s",
targetOffset_.ToString().c_str());

View File

@ -315,6 +315,7 @@ private:
float previewScale_ = 1.0f;
MenuDumpInfo dumpInfo_;
MarginPropertyF layoutRegionMargin_;
bool isTargetNodeInSubwindow_ = false;
bool isExpandDisplay_ = false;
bool isFreeMultiWindow_ = false;
bool isUIExtensionSubWindow_ = false;