解决表冠旋转方向与slider值相反bug 2620/1 2620/head 2621/target/1
authorluozheng <1732036298@qq.com>
Tue, 28 Oct 2025 03:35:13 +0000 (11:35 +0800)
committerluozheng <1732036298@qq.com>
Tue, 28 Oct 2025 03:35:13 +0000 (11:35 +0800)
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_slider.cpp

index 47563ed..e246f1c 100644 (file)
@@ -364,7 +364,7 @@ bool UISlider::OnRotateEvent(const RotateEvent& event)
 {
     int32_t realRotation = 0;
     cachedRotation_ += event.GetRotate() * rotateFactor_;
-    realRotation = static_cast<int32_t>(cachedRotation_);
+    realRotation = - static_cast<int32_t>(cachedRotation_);//解决表冠旋转方向与slider值相反bug
     if (realRotation == 0) {
         return UIView::OnRotateEvent(event);
     }