From ab1af6db44dacd7b59d6cc0ff61a8b9dc0a4efdf Mon Sep 17 00:00:00 2001 From: guyuanzhang Date: Sat, 27 Mar 2021 14:55:36 +0800 Subject: [PATCH] Description:fix UIList margin support Sig:graphic Feature or Bugfix:Feature Binary Source:No --- frameworks/components/ui_list.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/components/ui_list.cpp b/frameworks/components/ui_list.cpp index 4e9c394..46fac6e 100755 --- a/frameworks/components/ui_list.cpp +++ b/frameworks/components/ui_list.cpp @@ -593,7 +593,7 @@ void UIList::MoveChildByOffset(int16_t xOffset, int16_t yOffset) } else { width = view->GetRelativeRect().GetWidth(); if ((GetChildrenHead()->GetX() - GetChildrenHead()->GetStyle(STYLE_MARGIN_LEFT) + xOffset > - selectPosition_) || + selectPosition_) || (childrenTail_->GetX() + width + childrenTail_->GetStyle(STYLE_MARGIN_RIGHT) < selectPosition_)) { onSelectedIndex_ = NULL_SELECT_INDEX; onSelectedView_ = nullptr; -- GitLab