提交 77c141ca 编写于 作者: Y YueBiang 提交者: YueBiang

fixed 676334b9 from https://gitee.com/openharmony/graphic_ui/pulls/313

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