提交 676334b9 编写于 作者: Y YueBiang

IssueNo:#I423M9

Description:fix scroll bar bugs
Sig:graphic
Feature or Bugfix:Bugfix
Binary Source:No
Signed-off-by: NYueBiang <suyue7@huawei.com>
上级 f5e398bb
......@@ -639,6 +639,11 @@ void RootView::DrawTop(UIView* view, const Rect& rect)
}
stackCount = 0;
curView = par->GetNextSibling();
if (enableAnimator) {
par->OnPostDraw(*dc_.mapBufferInfo, curViewRect);
} else {
par->OnPostDraw(*dc_.bufferInfo, curViewRect);
}
par = par->GetParent();
}
}
......
......@@ -21,14 +21,13 @@
namespace {
constexpr uint16_t START_ANGLE_IN_DEGREE = 60;
constexpr uint16_t END_ANGLE_IN_DEGREE = 120;
constexpr uint16_t SCROLL_BAR_WIDTH = 4;
constexpr uint16_t SCROLL_BAR_MIN_ARC = 10;
} // namespace
namespace OHOS {
UIArcScrollBar::UIArcScrollBar()
: radius_(0),
width_(SCROLL_BAR_WIDTH),
width_(0),
startAngle_(START_ANGLE_IN_DEGREE),
endAngle_(END_ANGLE_IN_DEGREE),
center_({0, 0}) {}
......@@ -67,7 +66,7 @@ void UIArcScrollBar::DrawForeground(BufferInfo& gfxDstBuffer, const Rect& invali
}
ArcInfo arcInfo = {0};
arcInfo.radius = radius_;
arcInfo.radius = (radius_ > 0) ? (radius_ - 1) : 0;
arcInfo.center = center_;
arcInfo.startAngle = MATH_MAX(startAngle, START_ANGLE_IN_DEGREE);
arcInfo.endAngle = MATH_MIN(endAngle, END_ANGLE_IN_DEGREE);
......
......@@ -44,7 +44,13 @@ UIList::Recycle::~Recycle()
void UIList::Recycle::MesureAdapterRelativeRect()
{
uint16_t i = 0;
if (listView_ == nullptr) {
return;
}
UIView* childHead = listView_->childrenHead_;
if (childHead == nullptr) {
return;
}
uint16_t idx = childHead->GetViewIndex();
if (listView_->direction_ == VERTICAL) {
int32_t height = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册