From: Caisking Date: Thu, 21 Aug 2025 10:04:23 +0000 (+0800) Subject: 修改运动进度条的显示问题 X-Git-Tag: leiniao_debug_1.0.0_20250922_020716~152^2~14 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=2d1cf6335ef33f66ef8156c6673549e1f43fb23b;p=mirrors%2FFD230.git 修改运动进度条的显示问题 --- diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_card/src/TrainingDataView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_card/src/TrainingDataView.cpp index 771f8b7db..8cce5fd67 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_card/src/TrainingDataView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_card/src/TrainingDataView.cpp @@ -66,7 +66,7 @@ bool TrainingDataView ::InitPage() { circleProgress->SetCenterPosition(235, 235); circleProgress->SetRadius(215); circleProgress->SetStartAngle(215); - circleProgress->SetEndAngle(505 + 100); + circleProgress->SetEndAngle(505); circleProgress->SetCapType(CAP_ROUND); circleProgress->SetValue(100); diff --git a/code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_circle_progress.cpp b/code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_circle_progress.cpp index 6edd9b503..a17be1555 100644 --- a/code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_circle_progress.cpp +++ b/code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_circle_progress.cpp @@ -79,11 +79,7 @@ static void HwGetAngleRange(int16_t &start, int16_t &end) void UICircleProgress::GetAngleRange(int16_t& start, int16_t& end) const { GetStartEndAngle(start, end); -#if ENABLE_VGU_ENGINE && CAPABILITY_HWDRAW_PATH - HwGetAngleRange(start, end); -#else DrawArc::GetInstance()->GetDrawRange(start, end); -#endif } void UICircleProgress::GetRedrawAngle(int16_t& start, int16_t& end) const @@ -103,17 +99,16 @@ void UICircleProgress::GetRedrawAngle(int16_t& start, int16_t& end) const } else { end = angle + start; } -#if ENABLE_VGU_ENGINE && CAPABILITY_HWDRAW_PATH - HwGetAngleRange(start, end); -#else DrawArc::GetInstance()->GetDrawRange(start, end); -#endif } #if ENABLE_VGU_ENGINE && CAPABILITY_HWDRAW_PATH void UICircleProgress::DrawForegroundGradient(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea, const Point& point, const uint16_t& radius, const Vector2& angle) { ArcInfo arcInfo = {point, {0, 0}, radius, angle.x_, angle.y_, nullptr}; + while (FloatLess(arcInfo.endAngle, arcInfo.startAngle)) { + arcInfo.endAngle += CIRCLE_IN_DEGREE; + } arcInfo.radius -= foregroundStyle_->lineWidth_ / 2; // 2: half LiteMGfxEngine::GetInstance()->SyncHwDraw();