mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 15:10:30 +00:00
!48656 修复cache内ListItemGroup吸顶效果不生效问题
Merge pull request !48656 from wind/br2
This commit is contained in:
commit
93a8f17177
@ -1141,12 +1141,10 @@ void ListItemGroupLayoutAlgorithm::LayoutHeaderFooterRTL(LayoutWrapper* layoutWr
|
||||
UpdateZIndex(footerWrapper);
|
||||
footerMainSize = footerWrapper->GetGeometryNode()->GetFrameSize().MainSize(axis_);
|
||||
float footerPos = 0.0f;
|
||||
if ((sticky == V2::StickyStyle::BOTH || sticky == V2::StickyStyle::FOOTER) && !itemPosition_.empty()) {
|
||||
if (sticky == V2::StickyStyle::BOTH || sticky == V2::StickyStyle::FOOTER) {
|
||||
contentStartOffset_ = std::max(contentStartOffset_, 0.0f);
|
||||
float stickyPos = contentStartOffset_ - mainPos;
|
||||
if (GetEndIndex() == totalItemCount_ - 1) {
|
||||
stickyPos = std::min(stickyPos, GetEndPosition() - footerMainSize);
|
||||
}
|
||||
stickyPos = std::min(stickyPos, totalMainSize_ - footerMainSize_ - headerMainSize_);
|
||||
footerPos = std::max(footerPos, stickyPos);
|
||||
footerPos = std::min(footerPos, totalMainSize_ - footerMainSize_ - headerMainSize_);
|
||||
}
|
||||
@ -1189,12 +1187,10 @@ void ListItemGroupLayoutAlgorithm::LayoutHeaderFooterLTR(LayoutWrapper* layoutWr
|
||||
UpdateZIndex(headerWrapper);
|
||||
headerMainSize = headerWrapper->GetGeometryNode()->GetFrameSize().MainSize(axis_);
|
||||
float headerPos = 0.0f;
|
||||
if ((sticky == V2::StickyStyle::BOTH || sticky == V2::StickyStyle::HEADER) && !itemPosition_.empty()) {
|
||||
if (sticky == V2::StickyStyle::BOTH || sticky == V2::StickyStyle::HEADER) {
|
||||
contentStartOffset_ = std::max(contentStartOffset_, 0.0f);
|
||||
float stickyPos = contentStartOffset_ - mainPos;
|
||||
if (GetEndIndex() == totalItemCount_ - 1) {
|
||||
stickyPos = std::min(stickyPos, GetEndPosition() - headerMainSize);
|
||||
}
|
||||
stickyPos = std::min(stickyPos, totalMainSize_ - footerMainSize_ - headerMainSize_);
|
||||
headerPos = std::max(headerPos, stickyPos);
|
||||
}
|
||||
LayoutIndex(headerWrapper, paddingOffset, crossSize, headerPos);
|
||||
|
Loading…
Reference in New Issue
Block a user